Skip to content

Commit

Permalink
Merge pull request #48 from andela/bg-prevent-double-password-encrypt…
Browse files Browse the repository at this point in the history
…ion-on-password-update-161368505

#161368505 prevent double password encryption on password update
  • Loading branch information
Inumidun Amao committed Oct 22, 2018
2 parents 17101aa + 951fcf7 commit 29b7e0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/controllers/userController.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const userController = {
return res.status(401).jsend.error({ message: 'Verification link not valid' });
}
Users.update({
password: bcrypt.hashSync(req.body.password, 8)
password: req.body.password
}, {
where: { id: req.currentUser.id }
}).then(() => res.status(200).jsend.success({
Expand Down

0 comments on commit 29b7e0e

Please sign in to comment.