login datos solo necesarios
This commit is contained in:
@@ -23,6 +23,9 @@ const login = async (body) => {
|
||||
if (!res.activo) throw new Error('Este usuario fue desactivado.');
|
||||
if (encriptar.comparar(password, res.password)) {
|
||||
delete res.dataValues.password;
|
||||
delete res.dataValues.idCarrera;
|
||||
delete res.dataValues.idTipoUsuario;
|
||||
delete res.dataValues.telefono;
|
||||
return {
|
||||
Usuario: res,
|
||||
token: crearTokenUsuario({
|
||||
|
||||
Reference in New Issue
Block a user