primer semestre listo
This commit is contained in:
@@ -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) => ({
|
||||
|
||||
Reference in New Issue
Block a user