pre lulu
This commit is contained in:
@@ -15,6 +15,7 @@ const registroValidado = async (body) => {
|
||||
200
|
||||
);
|
||||
let correoResponsable = {};
|
||||
let correoAlumno = {};
|
||||
let emailResponsable = '';
|
||||
|
||||
return Servicio.findOne({
|
||||
@@ -26,11 +27,9 @@ const registroValidado = async (body) => {
|
||||
})
|
||||
.then((res) => {
|
||||
if (!res) throw new Error('No existe este Servicio Social.');
|
||||
|
||||
switch (res.idStatus) {
|
||||
case 2:
|
||||
let correoAlumno = correos.registroValidadoAlumno(res.Usuario.nombre);
|
||||
|
||||
correoAlumno = correos.registroValidadoAlumno(res.Usuario.nombre);
|
||||
correoResponsable = correos.registroValidadoResponsable(
|
||||
res.Usuario.nombre
|
||||
);
|
||||
@@ -63,20 +62,16 @@ const registroValidado = async (body) => {
|
||||
);
|
||||
}
|
||||
})
|
||||
.then((res) => {
|
||||
return gmail(
|
||||
correoResponsable.subject,
|
||||
emailResponsable,
|
||||
correoResponsable.msj
|
||||
);
|
||||
})
|
||||
.then((res) => {
|
||||
return Servicio.update(
|
||||
.then((res) =>
|
||||
gmail(correoResponsable.subject, emailResponsable, correoResponsable.msj)
|
||||
)
|
||||
.then((res) =>
|
||||
Servicio.update(
|
||||
// { idStatus: 3, direccion, telefono, fechaNacimiento },
|
||||
{ idStatus: 4, direccion, telefono, fechaNacimiento },
|
||||
{ where: { idServicio } }
|
||||
);
|
||||
})
|
||||
)
|
||||
)
|
||||
.then((res) => {
|
||||
return {
|
||||
message:
|
||||
|
||||
Reference in New Issue
Block a user