Skip to content

Commit 0c84d1a

Browse files
authored
Merge pull request #190 from pragun22/issue-165
Issue165: auth/login route not working #185
2 parents 9a449ae + 161bd9b commit 0c84d1a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

routes/login.routes.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,12 @@ route.post('/login', url, function(req, res) {
9696
.findOne({ email: req.body.email })
9797
.lean()
9898
.then(function(data) {
99-
if (data.compare(req.body.password)) {
99+
if (data.password == req.body.password) {
100100
res.redirect('/profile/profile/' + data.eid);
101+
// console.log('pass matched');
101102
} else {
102103
res.redirect('/');
104+
// console.log('did not match');
103105
}
104106
});
105107
});

0 commit comments

Comments
 (0)