Add messages

This commit is contained in:
NyxiumYuuki 2021-06-01 22:34:39 +02:00
parent 22b137931d
commit 577abeb65c

View file

@ -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;