listo
This commit is contained in:
@@ -17,7 +17,6 @@ const nuevo = async (body) => {
|
||||
retroalimentacion += body.retroalimentacion[i];
|
||||
if (i < body.retroalimentacion.length - 1) retroalimentacion += ',';
|
||||
}
|
||||
|
||||
return Servicio.findOne({ where: { idServicio } })
|
||||
.then((res) => {
|
||||
if (!res) throw new Error('No existe este Servicio Social.');
|
||||
@@ -59,15 +58,13 @@ const nuevo = async (body) => {
|
||||
throw new Error('Este Servicio Social fue cancelado.');
|
||||
}
|
||||
})
|
||||
.then((res) => {
|
||||
return Servicio.update(
|
||||
.then((res) =>
|
||||
Servicio.update(
|
||||
{ idCuestionarioPrograma: res.idCuestionarioPrograma },
|
||||
{ where: { idServicio } }
|
||||
);
|
||||
})
|
||||
.then((res) => {
|
||||
return validar.validarPreTermino(idServicio);
|
||||
})
|
||||
)
|
||||
)
|
||||
.then((res) => validar.validarPreTermino(idServicio))
|
||||
.then((res) => {
|
||||
return { message: `Se guradaron tus respuestas correctamente. ${res}` };
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user