feca correo, tamaño adscripcion

This commit is contained in:
2022-05-24 21:04:31 -05:00
parent d124dfa02f
commit f8d17c8f27
2 changed files with 6 additions and 5 deletions
+5 -4
View File
@@ -1,10 +1,11 @@
const Invitado = require('../../db/tablas/Invitado');
const Profesor = require('../../db/tablas/Profesor');
const Premiacion = require('../../db/tablas/Premiacion');
const ProfesorPremiacion = require('../../db/tablas/ProfesorPremiacion');
const validar = require('../../helper/validar');
const { correo } = require('../../helper/correos');
const gmail = require('../../helper/gmail');
const ProfesorPremiacion = require('../../db/tablas/ProfesorPremiacion');
const moment = require('moment');
const infoInvitados = async (body) => {
const idProfesor = validar.validarNumeroEntero(body.idProfesor, 'idProfesor');
@@ -64,19 +65,19 @@ const infoInvitados = async (body) => {
throw new Error('No se ha podido ingresar los datos del invitado');
respuesta.push(res);
}
let fecha = moment(premiacion.fecha).format("DD-MM-YYYY")
const Mail = correo(
profPrem.idProfesor,
profPrem.idPremiacion,
premiacion.premiacion,
premiacion.fecha,
fecha,
premiacion.hora
);
const dataProf = await Profesor.findOne({ where: idProfesor });
gmail(
Mail.subject,
// `jeremy@acatlan.unam.mx`,
`${dataProf.numeroTrabajador}@pcpuma.acatlan.unam.mx`,
Mail.message
);
+1 -1
View File
@@ -19,7 +19,7 @@ Profesor.init(
allowNull: false,
},
adscripcion: {
type: DataTypes.STRING(80),
type: DataTypes.STRING(200),
allowNull: false,
},
correo: {