Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Commit

Permalink
Fix change password error message
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamVig committed Apr 26, 2017
1 parent e43511c commit 282173c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/user.js
Expand Up @@ -36,7 +36,7 @@ user.changeUserPassword = function changeUserPassword (req, res, next) {
if (matches) {
return bcrypt.hash(req.body.newPassword, auth.saltRounds)
} else {
throw new restify.BadRequestError('passwords do not match')
throw new restify.BadRequestError('Wrong password')
}
})
.then(hashedPassword => {
Expand All @@ -45,7 +45,7 @@ user.changeUserPassword = function changeUserPassword (req, res, next) {
})
.then((result) => {
return res.send({
message: 'password changed'
message: 'Password successfully changed'
})
})
.catch(next)
Expand Down

0 comments on commit 282173c

Please sign in to comment.