Files
citas_recorridos_api/server/controller/TercerSemestre/asistentes.js
T
Lemuel Marquez 407f292738 gurpo horario
2021-07-23 13:02:58 -05:00

20 lines
595 B
JavaScript

const helperPath = '../../helper';
const validar = require(`${helperPath}/validar`);
const dbPath = '../../db/tablas';
const Carrera = require(`${dbPath}/Carrera`);
const Grupo = require(`${dbPath}/Grupo`);
const TercerSemestre = require(`${dbPath}/TercerSemestre`);
const asistentes = async (body) => {
const idGrupo = validar.validarId(body.idGrupo);
return Grupo.findOne({ where: { idGrupo } }).then((res) => {
return TercerSemestre.findAll({
where: { idGrupo },
include: [{ model: Grupo, include: [{ model: Carrera }] }],
});
});
};
module.exports = asistentes;