feca correo, tamaño adscripcion
This commit is contained in:
@@ -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
|
||||
);
|
||||
|
||||
@@ -19,7 +19,7 @@ Profesor.init(
|
||||
allowNull: false,
|
||||
},
|
||||
adscripcion: {
|
||||
type: DataTypes.STRING(80),
|
||||
type: DataTypes.STRING(200),
|
||||
allowNull: false,
|
||||
},
|
||||
correo: {
|
||||
|
||||
Reference in New Issue
Block a user