correo declinar
This commit is contained in:
@@ -1,9 +1,22 @@
|
||||
const { validarNumeroEntero } = require('../../helper/validar');
|
||||
const {
|
||||
validarNumeroEntero,
|
||||
validarNumeroCuenta,
|
||||
} = require('../../helper/validar');
|
||||
const dbPath = '../../db/tablas';
|
||||
const Inscripcion = require(`${dbPath}/Inscripcion`);
|
||||
const gmail = require('../../helper/gmail');
|
||||
const correoDeclinar = require('../../helper/correoDeclinar');
|
||||
|
||||
const validarTicket = async (body) => {
|
||||
const folio = validarNumeroEntero(body.folio, 'folio', true);
|
||||
const numeroCuenta = validarNumeroCuenta(
|
||||
body.numeroCuenta,
|
||||
'número de cuenta',
|
||||
true
|
||||
);
|
||||
|
||||
let correo = {};
|
||||
let email = '';
|
||||
|
||||
return Inscripcion.findOne({
|
||||
where: { folio },
|
||||
@@ -33,6 +46,8 @@ const validarTicket = async (body) => {
|
||||
})
|
||||
.then((res) => {
|
||||
if (body.validacion === 0) {
|
||||
email = `${numeroCuenta}@pcpuma.acatlan.unam.mx`;
|
||||
correoDeclinar = correoInscripciones();
|
||||
return Inscripcion.update(
|
||||
{ motivo: body.motivo },
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user