primer semestre listo

This commit is contained in:
2021-07-13 18:39:13 -05:00
parent 539ef950d0
commit 90888eed4b
3 changed files with 8 additions and 8 deletions
@@ -15,14 +15,9 @@ const get = async (body) => {
const idHorario = validar.validarId(body.idHorario);
const numeroCuenta = validar.validarNumeroCuenta(body.numeroCuenta);
const correo = validar.validarCorreo(body.correo);
const nombre = validar.validarTexto(body.nombre, 'El nombre', 70);
let mail = {};
/*
Falta
Enviar correo con qr de confirmación de su registro a su
email
*/
return Carrera.findOne({ where: { idCarrera } })
.then((res) => {
if (!res) throw new Error('No existe esta carrera.');
@@ -63,12 +58,13 @@ const get = async (body) => {
return PrimerSemestre.create({
numeroCuenta,
correo,
nombre,
idHorario,
idGrupo,
});
})
.then((res) => {
mail = correo = correos(res.nombre, res.numeroCuenta);
mail = correos(res.nombre, res.numeroCuenta);
gmail(mail.subject, res.correo, mail.message);
})
.then((res) => ({