sincronizacion del correo
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user