diff --git a/src/libs/routes/enrollmentProjection.js b/src/libs/routes/enrollmentProjection.js index b5f55b4ae49e9261e701559430c9f42c138e2996..1bbe8ea3934a4fe59116ec0a3d96d292a446d59f 100644 --- a/src/libs/routes/enrollmentProjection.js +++ b/src/libs/routes/enrollmentProjection.js @@ -124,6 +124,16 @@ enrollmentProjectionApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => { .order('projecao_matricula.etapa_ensino_escola_ano_id'); next(); -}, query, id2str.transform(), response('enrollment_projection')); +}, query, id2str.transform(), (req, res, next) => { + + req.result.forEach((r) => { + r.urban_day_total = parseInt(r.urban_day_total, 10); + r.urban_night_total = parseInt(r.urban_night_total, 10); + r.rural_day_total = parseInt(r.rural_day_total, 10); + r.rural_night_total = parseInt(r.rural_night_total, 10); + }); + + next(); +}, response('enrollment_projection')); module.exports = enrollmentProjectionApp; \ No newline at end of file