From 6b9da0c94162e4905980ffed21f563be684b5171 Mon Sep 17 00:00:00 2001 From: Fernando Erd <fce15@inf.ufpr.br> Date: Mon, 10 Jul 2017 11:15:06 -0300 Subject: [PATCH] Fix return --- src/libs/routes/idhm.js | 8 ++++---- src/libs/routes/idhmr.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libs/routes/idhm.js b/src/libs/routes/idhm.js index b4e1220a..5248246a 100644 --- a/src/libs/routes/idhm.js +++ b/src/libs/routes/idhm.js @@ -141,7 +141,7 @@ idhmApp.get('/', rqf.parse(), (req, res, next) => { if ("state" in req.filter) { console.log("BBBBB"); req.sql.from('adh_idh_uf') - .field('adh_idh_uf.idhm', 'IDHM') + .field('adh_idh_uf.idhm', 'total') .field('adh_idh_uf.ano_censo', 'year') .field('adh_idh_uf.estado_id', 'state_id') .group('adh_idh_uf.idhm') @@ -150,7 +150,7 @@ idhmApp.get('/', rqf.parse(), (req, res, next) => { } else if ("state" in req.dims) { console.log("AAAAAAAAA"); req.sql.from('adh_idh') - .field('adh_idh.idhm', 'IDHM') + .field('adh_idh.idhm', 'total') .field('adh_idh.ano_censo', 'year') .field('adh_idh.municipio_id', 'city_id') .field('adh_idh.estado_id', 'state_id') @@ -160,7 +160,7 @@ idhmApp.get('/', rqf.parse(), (req, res, next) => { .group('adh_idh.estado_id') } else if ("city" in req.filter) { req.sql.from('adh_idh') - .field('adh_idh.idhm', 'IDHM') + .field('adh_idh.idhm', 'total') .field('adh_idh.ano_censo', 'year') .field('adh_idh.municipio_id', 'city_id') .group('adh_idh.idhm') @@ -168,7 +168,7 @@ idhmApp.get('/', rqf.parse(), (req, res, next) => { .group('adh_idh.municipio_id') } else if ("city" in req.dims) { req.sql.from('adh_idh') - .field('adh_idh.idhm', 'IDHM') + .field('adh_idh.idhm', 'total') .field('adh_idh.ano_censo', 'year') .field('adh_idh.municipio_id', 'city_id') .group('adh_idh.idhm') diff --git a/src/libs/routes/idhmr.js b/src/libs/routes/idhmr.js index eba2a3ea..ca240d17 100644 --- a/src/libs/routes/idhmr.js +++ b/src/libs/routes/idhmr.js @@ -116,12 +116,12 @@ idhmrApp.get('/', rqf.parse(), (req, res, next) => { } if ("state" in req.filter) { req.sql.from('adh_idh_uf') - .field('adh_idh_uf.idhm_r', 'IDHME') + .field('adh_idh_uf.idhm_r', 'total') .field('adh_idh_uf.ano_censo', 'year') .field('adh_idh_uf.estado_id', 'state_id'); } else if ("city" in req.filter) { req.sql.from('adh_idh') - .field('adh_idh.idhm_r', 'IDHME') + .field('adh_idh.idhm_r', 'total') .field('adh_idh.ano_censo', 'year') .field('adh_idh.municipio_id', 'city_id'); } -- GitLab