sincronizacion del correo

This commit is contained in:
Andres2908
2022-07-28 22:14:06 -05:00
parent c5c06a571a
commit 79c726e96b
4 changed files with 15 additions and 21 deletions
+11 -14
View File
@@ -56,20 +56,19 @@ const validarTicket = async (body) => {
);
})
.then((res) => {
email = `${numeroCuenta}@pcpuma.acatlan.unam.mx`;
if (body.validacion === 1) {
email = `${numeroCuenta}@pcpuma.acatlan.unam.mx`;
correo = correoInscripcion();
usuarioInscrito(numeroCuenta, idArea);
agregarRecibo(
folio,
monto,
moment(fechaTicket).format('L'),
numeroCuenta
);
agregarDetalleServicio(monto, numeroCuenta);
// usuarioInscrito(numeroCuenta, idArea);
// agregarRecibo(
// folio,
// monto,
// moment(fechaTicket).format('L'),
// numeroCuenta
// );
// agregarDetalleServicio(monto, numeroCuenta);
} else {
email = `${numeroCuenta}@pcpuma.acatlan.unam.mx`;
correoDeclinar = correoDeclinar();
correo = correoDeclinar();
return Inscripcion.update(
{ motivo: body.motivo },
{
@@ -81,6 +80,7 @@ const validarTicket = async (body) => {
}
})
.then((res) => {
gmail(correo.subject, email, correo.msj);
if (body.validacion === 1) {
return {
message: '¡El ticket a sido validado de forma correcta!',
@@ -90,9 +90,6 @@ const validarTicket = async (body) => {
message: '¡El ticket a sido declinado',
};
})
.then((res) => {
return gmail(correo.subject, email, correo.msj);
})
.catch((err) => {
throw new Error('No fue posible validar el ticket. ' + err);
});