Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
makon57 committed Jul 2, 2021
1 parent 2cab79d commit fbc07d1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions routes/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ router.post('/', csrfProtection, loginValidators, asyncHandler(async (req,res,ne
if (user !== null ) {
// const userPassword = await db.User.findOne({where: {password}}) ;
if(userPassword === password) {
loginUser(req, res, user);
res.redirect('/');
loginUser(req, res, user);
return res.redirect('/');
}

}
errors.push('Login failed')
} else {
Expand Down

0 comments on commit fbc07d1

Please sign in to comment.