From cee0eee2ecda809fec64d0ff53d98d5b41168ed3 Mon Sep 17 00:00:00 2001 From: fgs21 <fgs21@inf.ufpr.br> Date: Wed, 9 Oct 2024 10:59:32 -0300 Subject: [PATCH] [ADD] Adding rqf builders to the route, where it can build the query with filters/dims --- src/libs/routes_v1/uniLocalOfferAggregate.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/routes_v1/uniLocalOfferAggregate.js b/src/libs/routes_v1/uniLocalOfferAggregate.js index 184bc60d..28f6abdf 100644 --- a/src/libs/routes_v1/uniLocalOfferAggregate.js +++ b/src/libs/routes_v1/uniLocalOfferAggregate.js @@ -79,11 +79,12 @@ rqf.addField({ } }); -uniLocalOfferAggregateApp.get('/', (req, res, next) => { +uniLocalOfferAggregateApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => { req.sql.from('curso_superior_agregado') .field('DISTINCT curso_superior_agregado.cod_ies', 'cod') .field('ies_ens_superior.nome_ies', 'nome') .join('ies_ens_superior', null, 'curso_superior_agregado.cod_ies = ies_ens_superior.cod_ies and curso_superior_agregado.ano_censo = ies_ens_superior.ano_censo') + .order('curso_superior_agregado.cod_ies') next(); }, query, response('uni_offer_aggregate')); -- GitLab