Commit 7e3081b2 authored by pdg16's avatar pdg16
Browse files

add warning cpf update user

parent f6d8c279
Pipeline #19867 failed with stage
in 1 minute and 57 seconds
......@@ -270,7 +270,10 @@ userApp.put('/:id', passport.authenticate('bearer', { session: false }), (req, r
user.save(err => {
if(err) {
log.error(err);
return next({message: 'Erro ao atualizar usuário'});
res.statusCode = 500;
return res.json({error: {
message: 'Email já cadastrado'
}});
}
let u = user.toObject();
delete u.hashedPassword;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment