Skip to content

Commit 161bd9b

Browse files
committed
solved issue number 165 by making changes in login_routes.js
1 parent c1df08c commit 161bd9b

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
@@ -61,10 +61,12 @@ route.post('/login', url, function(req, res) {
6161
.findOne({ email: req.body.email })
6262
.lean()
6363
.then(function(data) {
64-
if (data.compare(req.body.password)) {
64+
if (data.password == req.body.password) {
6565
res.redirect('/profile/profile/' + data.eid);
66+
// console.log('pass matched');
6667
} else {
6768
res.redirect('/');
69+
// console.log('did not match');
6870
}
6971
});
7072
});

0 commit comments

Comments
 (0)