Add messages
This commit is contained in:
parent
22b137931d
commit
577abeb65c
1 changed files with 2 additions and 2 deletions
|
|
@ -13,10 +13,10 @@ async function changePassword (req,res) {
|
||||||
|
|
||||||
const change = await queries.changePasswordQuery(req.body.username, req.body.password, req.body.newpassword);
|
const change = await queries.changePasswordQuery(req.body.username, req.body.password, req.body.newpassword);
|
||||||
if (change){
|
if (change){
|
||||||
return sendMessage(res, change);
|
return sendMessage(res, 'Le mot de passe a été changé.');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
return sendError(res, 'cant change');
|
return sendError(res, 'Mot de passe actuel incorrect ou erreur interne');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
module.exports = changePassword;
|
module.exports = changePassword;
|
||||||
|
|
|
||||||
Reference in a new issue