error undefined correo responsable

This commit is contained in:
Lemuel Marquez
2021-05-13 01:23:47 -05:00
parent d143002608
commit 4bfb659914
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ const Usuario = require(`${dbPath}/Usuario`);
const liberacion = async (body) => {
const idServicio = validar.validarId(body.idServicio);
const update = { idStatus: 6, fechaLiberacion: moment() };
const update = { idStatus: 6, fechaLiberacion: moment().format() };
let correo = {};
return Servicio.findOne({
@@ -15,7 +15,7 @@ const newPasswordResponsable = async (body) => {
if (!res) throw new Error('No existe este Usuario.');
if (res.idTipoUsuario != 2)
throw new Error('Este usuario no es de tipo responsable.');
correo = correos.enviarSec(password, res.correo, res.nombre);
correo = correos.enviarSec(password, res.usuario, res.nombre);
return gmail(correo.subject, res.usuario, correo.msj);
})
.then((res) =>