fecha de termino añadida

This commit is contained in:
2021-03-01 19:14:04 -06:00
parent 98c712b770
commit 2011018794
2 changed files with 11 additions and 1 deletions
+6 -1
View File
@@ -1,3 +1,4 @@
const moment = require('moment');
const validar = require('../../helper/validar');
const gmail = require('../../helper/gmail');
const correos = require('../../helper/correos');
@@ -48,7 +49,11 @@ const liberacion = async (body) => {
throw new Error('Id status no valido.');
}
})
.then((res) => Servicio.update(update, { where: { idServicio } }))
.then((res) =>
Servicio.update(update, {
where: { idServicio, fechaLiberacion: moment() },
})
)
.then((res) => ({
message:
'Se cambio de estatus correctamente y se envio un correo al alumno informandole de su liberación.',