diff --git a/src/libs/routes_v1/rateSchoolNew.js b/src/libs/routes_v1/rateSchoolNew.js index 98fa78ea8d5fa46ea732592bd5f714e5cf62feee..cd08aeddfc5bcc912eb23f2f86bbc6ccd52b88f2 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'));