Skip to content

Commit

Permalink
Merge pull request #190 from pragun22/issue-165
Browse files Browse the repository at this point in the history
Issue165: auth/login route not working #185
  • Loading branch information
vaibhavdaren authored May 4, 2019
2 parents 9a449ae + 161bd9b commit 0c84d1a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion routes/login.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,12 @@ route.post('/login', url, function(req, res) {
.findOne({ email: req.body.email })
.lean()
.then(function(data) {
if (data.compare(req.body.password)) {
if (data.password == req.body.password) {
res.redirect('/profile/profile/' + data.eid);
// console.log('pass matched');
} else {
res.redirect('/');
// console.log('did not match');
}
});
});
Expand Down

0 comments on commit 0c84d1a

Please sign in to comment.