Improve performance
This commit is contained in:
parent
253747ecfb
commit
93c0af613f
7 changed files with 12 additions and 8 deletions
|
@ -20,7 +20,7 @@ module.exports = async (params, user) => new Promise(async (res, rej) => {
|
|||
if (passwordErr) return rej('invalid password param');
|
||||
|
||||
// Compare password
|
||||
const same = bcrypt.compareSync(password, user.password);
|
||||
const same = await bcrypt.compare(password, user.password);
|
||||
|
||||
if (!same) {
|
||||
return rej('incorrect password');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue