|
if ( user.password !== password ) { |
On the line
#34 compareSync 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.
node-starter/app/controllers/usersController.js
Line 36 in f89acab
On the line
#34compareSyncfunction returns eithertrueorfalse.On the line
#36the 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.