fecha de termino añadida
This commit is contained in:
@@ -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.',
|
||||
|
||||
Reference in New Issue
Block a user