You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the line #34compareSync function returns either true or false.
On the line #36 the returned value is compared with the user password wich doesn't makes any sense because the user password will never be true.
So instead of if ( user.password !== password ) { it's better to use if ( password) { to check if given password is correct or not.
The text was updated successfully, but these errors were encountered:
node-starter/app/controllers/usersController.js
Line 36 in f89acab
On the line
#34
compareSync
function returns eithertrue
orfalse
.On the line
#36
the returned value is compared with the user password wich doesn't makes any sense because the user password will never betrue
.So instead of
if ( user.password !== password ) {
it's better to useif ( password) {
to check if given password is correct or not.The text was updated successfully, but these errors were encountered: