mirror of
https://github.com/Troplo/Colubrina.git
synced 2024-11-25 12:46:42 +11:00
Update user.js
This commit is contained in:
parent
b1e3c40b36
commit
eaf54b2863
1 changed files with 1 additions and 1 deletions
|
@ -511,7 +511,7 @@ router.put("/settings/:type", auth, async (req, res, next) => {
|
|||
id: req.user.id
|
||||
}
|
||||
})
|
||||
const match = await checkPasswordArgon2(req.body.current)
|
||||
const match = await checkPasswordArgon2(req.body.current, user.password)
|
||||
if (match) {
|
||||
await user.update({
|
||||
password: await argon2.hash(req.body.new)
|
||||
|
|
Loading…
Reference in a new issue