This is currently unhandled since you've not done a .then() after it.
if you want to assign the result to a variable you would have to use bcrypt.compareSync
the way its currently set up is that it will call the promise in both if statements running through both and slowing down the code due to the fact it has to do the compare twice.
the calling of bcrypt.compare on line 29 of the handler will return a promise due to the fact that you haven't given it a callback
const isMatch = bcrypt.compare(password, storedPassword);
This is currently unhandled since you've not done a
.then()
after it.if you want to assign the result to a variable you would have to use
bcrypt.compareSync
the way its currently set up is that it will call the promise in both if statements running through both and slowing down the code due to the fact it has to do the compare twice.
will take the resolve from the comparison forward at which point you could do the checking for whether it was true or false