diff --git a/server/controller/Servicio/gustavoBazPrada.js b/server/controller/Servicio/gustavoBazPrada.js index 2a243ee..45166da 100644 --- a/server/controller/Servicio/gustavoBazPrada.js +++ b/server/controller/Servicio/gustavoBazPrada.js @@ -14,10 +14,10 @@ const gustavoBazPrada = async (body) => { return Servicio.findAll({ where: { - [Op.and]: { - fechaLiberacion: { [Op.gte]: moment(`${year}-01-31`) }, - fechaLiberacion: { [Op.lte]: moment(`${year + 1}-01-31`) }, - }, + [Op.and]: [ + { fechaLiberacion: { [Op.gte]: moment(`${year}-01-31`) } }, + { fechaLiberacion: { [Op.lte]: moment(`${year + 1}-01-31`) } }, + ], }, include: [{ model: Usuario }, { model: Carrera }], }).then((res) => { diff --git a/server/controller/Servicio/reporte.js b/server/controller/Servicio/reporte.js index 5b7f1fc..5fba05e 100644 --- a/server/controller/Servicio/reporte.js +++ b/server/controller/Servicio/reporte.js @@ -15,10 +15,10 @@ const reporte = async (body) => { return Servicio.findAll({ where: { - [Op.and]: { - fechaInicio: { [Op.gte]: inicio }, - fechaInicio: { [Op.lte]: fin }, - }, + [Op.and]: [ + { fechaInicio: { [Op.gte]: inicio } }, + { fechaInicio: { [Op.lte]: fin } }, + ], }, include: [{ model: Programa }, { model: Usuario }, { model: Carrera }], }).then((res) => {