return objeto
This commit is contained in:
@@ -47,9 +47,9 @@ const cancelar = async (body) => {
|
||||
)
|
||||
)
|
||||
.then((res) => Servicio.update({ idStatus: 10 }, { where: { idServicio } }))
|
||||
.then((res) => {
|
||||
return { message: 'Se cancelo correctamente este Servicio Social.' };
|
||||
});
|
||||
.then((res) => ({
|
||||
message: 'Se cancelo correctamente este Servicio Social.',
|
||||
}));
|
||||
};
|
||||
|
||||
module.exports = cancelar;
|
||||
|
||||
@@ -51,11 +51,9 @@ const cartaTermino = async (body, file) => {
|
||||
{ where: { idServicio } }
|
||||
)
|
||||
)
|
||||
.then((res) => {
|
||||
return {
|
||||
message: `Se subio la Carta de Aceptación correctamente.`,
|
||||
};
|
||||
});
|
||||
.then((res) => ({
|
||||
message: `Se subio la Carta de Aceptación correctamente.`,
|
||||
}));
|
||||
};
|
||||
|
||||
module.exports = cartaTermino;
|
||||
|
||||
@@ -48,9 +48,9 @@ const cartaTermino = async (body, file) => {
|
||||
Servicio.update({ cartaTermino: res }, { where: { idServicio } })
|
||||
)
|
||||
.then((res) => validar.validarPreTermino(idServicio))
|
||||
.then((res) => {
|
||||
return { message: `Se subio la Carta de Termino correctamente. ${res}` };
|
||||
});
|
||||
.then((res) => ({
|
||||
message: `Se subio la Carta de Termino correctamente. ${res}`,
|
||||
}));
|
||||
};
|
||||
|
||||
module.exports = cartaTermino;
|
||||
|
||||
@@ -48,9 +48,9 @@ const informeGlobal = async (body, file) => {
|
||||
Servicio.update({ informeGlobal: res }, { where: { idServicio } })
|
||||
)
|
||||
.then(async (res) => validar.validarPreTermino(idServicio))
|
||||
.then((res) => {
|
||||
return { message: `Se subio el Informe Global correctamente. ${res}` };
|
||||
});
|
||||
.then((res) => ({
|
||||
message: `Se subio el Informe Global correctamente. ${res}`,
|
||||
}));
|
||||
};
|
||||
|
||||
module.exports = informeGlobal;
|
||||
|
||||
@@ -47,12 +47,10 @@ const liberacion = async (body) => {
|
||||
}
|
||||
})
|
||||
.then((res) => Servicio.update(update, { where: { idServicio } }))
|
||||
.then((res) => {
|
||||
return {
|
||||
message:
|
||||
'Se cambio de estatus correctamente y se envio un correo al alumno informandole de su liberación.',
|
||||
};
|
||||
});
|
||||
.then((res) => ({
|
||||
message:
|
||||
'Se cambio de estatus correctamente y se envio un correo al alumno informandole de su liberación.',
|
||||
}));
|
||||
};
|
||||
|
||||
module.exports = liberacion;
|
||||
|
||||
@@ -76,11 +76,9 @@ const nuevo = async (body, file) => {
|
||||
programaInterno,
|
||||
})
|
||||
)
|
||||
.then((res) => {
|
||||
return {
|
||||
message: `Se Pre-Registro correctamente al alumno.`,
|
||||
};
|
||||
});
|
||||
.then((res) => ({
|
||||
message: `Se Pre-Registro correctamente al alumno.`,
|
||||
}));
|
||||
};
|
||||
|
||||
module.exports = nuevo;
|
||||
|
||||
@@ -61,9 +61,9 @@ const cancelar = async (body) => {
|
||||
{ where: { idServicio } }
|
||||
)
|
||||
)
|
||||
.then((res) => {
|
||||
return { message: 'Se rechazo correctamente la Carta de Aceptación.' };
|
||||
});
|
||||
.then((res) => ({
|
||||
message: 'Se rechazo correctamente la Carta de Aceptación.',
|
||||
}));
|
||||
};
|
||||
|
||||
module.exports = cancelar;
|
||||
|
||||
@@ -62,9 +62,9 @@ const cancelar = async (body) => {
|
||||
{ where: { idServicio } }
|
||||
)
|
||||
)
|
||||
.then((res) => {
|
||||
return { message: 'Se rechazo correctamente el Informe Global.' };
|
||||
});
|
||||
.then((res) => ({
|
||||
message: 'Se rechazo correctamente el Informe Global.',
|
||||
}));
|
||||
};
|
||||
|
||||
module.exports = cancelar;
|
||||
|
||||
@@ -62,9 +62,9 @@ const cancelar = async (body) => {
|
||||
{ where: { idServicio } }
|
||||
)
|
||||
)
|
||||
.then((res) => {
|
||||
return { message: 'Se rechazo correctamente la Carta de Termino.' };
|
||||
});
|
||||
.then((res) => ({
|
||||
message: 'Se rechazo correctamente la Carta de Termino.',
|
||||
}));
|
||||
};
|
||||
|
||||
module.exports = cancelar;
|
||||
|
||||
@@ -48,12 +48,10 @@ const registro = async (body) => {
|
||||
);
|
||||
})
|
||||
.then((res) => Servicio.update({ idStatus: 2 }, { where: { idServicio } }))
|
||||
.then((res) => {
|
||||
return {
|
||||
message:
|
||||
'Se cambio de estatus correctamente y se envio un correo al alumno con sus credenciales.',
|
||||
};
|
||||
});
|
||||
.then((res) => ({
|
||||
message:
|
||||
'Se cambio de estatus correctamente y se envio un correo al alumno con sus credenciales.',
|
||||
}));
|
||||
};
|
||||
|
||||
module.exports = registro;
|
||||
|
||||
@@ -74,12 +74,9 @@ const registroValidado = async (body) => {
|
||||
{ where: { idServicio } }
|
||||
)
|
||||
)
|
||||
.then((res) => {
|
||||
return {
|
||||
message:
|
||||
'Haz terminado el registro de tu Servicio Social correctamente.',
|
||||
};
|
||||
});
|
||||
.then((res) => ({
|
||||
message: 'Haz terminado el registro de tu Servicio Social correctamente.',
|
||||
}));
|
||||
};
|
||||
|
||||
module.exports = registroValidado;
|
||||
|
||||
@@ -57,11 +57,9 @@ const update = async (body, files) => {
|
||||
);
|
||||
return Servicio.update(dataUpdate, { where: { idServicio } });
|
||||
})
|
||||
.then((res) => {
|
||||
return {
|
||||
message: 'Se guadro correctamente los cambios de este servicio.',
|
||||
};
|
||||
});
|
||||
.then((res) => ({
|
||||
message: 'Se guadro correctamente los cambios de este servicio.',
|
||||
}));
|
||||
};
|
||||
|
||||
module.exports = update;
|
||||
|
||||
Reference in New Issue
Block a user