From 058b461a787aa52d25bb6d735b32d938aa4aa53e Mon Sep 17 00:00:00 2001 From: Fernando Gbur <fgs21@inf.ufpr.br> Date: Tue, 16 Jul 2024 17:33:14 -0400 Subject: [PATCH] [FIX] Trying to fix the null return in route --- src/libs/routes_v1/rateSchoolNew.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libs/routes_v1/rateSchoolNew.js b/src/libs/routes_v1/rateSchoolNew.js index 98fa78ea..cd08aedd 100644 --- a/src/libs/routes_v1/rateSchoolNew.js +++ b/src/libs/routes_v1/rateSchoolNew.js @@ -325,6 +325,8 @@ function matchQueries(attendsSchoolObj, populationObj) { match.push(newObj); } + console.log(match) + return match; } @@ -358,7 +360,8 @@ rateSchoolNewApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => { next(); }, multiQuery, (req, res, next) => { - req.result = matchQueries(req.result[0], req.result[1]); + let newObj = matchQueries(req.result[0], req.result[1]); + req.result = newObj; next(); }, id2str.transform(false), response('rateSchoolNew')); -- GitLab