Skip to content
Snippets Groups Projects
Commit 6b9da0c9 authored by Fernando Erd's avatar Fernando Erd :ok_hand:
Browse files

Fix return

parent dfb3d2db
No related branches found
No related tags found
2 merge requests!116Release v1.0.0,!60IDHMR and IDHM routes
Pipeline #
...@@ -141,7 +141,7 @@ idhmApp.get('/', rqf.parse(), (req, res, next) => { ...@@ -141,7 +141,7 @@ idhmApp.get('/', rqf.parse(), (req, res, next) => {
if ("state" in req.filter) { if ("state" in req.filter) {
console.log("BBBBB"); console.log("BBBBB");
req.sql.from('adh_idh_uf') 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.ano_censo', 'year')
.field('adh_idh_uf.estado_id', 'state_id') .field('adh_idh_uf.estado_id', 'state_id')
.group('adh_idh_uf.idhm') .group('adh_idh_uf.idhm')
...@@ -150,7 +150,7 @@ idhmApp.get('/', rqf.parse(), (req, res, next) => { ...@@ -150,7 +150,7 @@ idhmApp.get('/', rqf.parse(), (req, res, next) => {
} else if ("state" in req.dims) { } else if ("state" in req.dims) {
console.log("AAAAAAAAA"); console.log("AAAAAAAAA");
req.sql.from('adh_idh') req.sql.from('adh_idh')
.field('adh_idh.idhm', 'IDHM') .field('adh_idh.idhm', 'total')
.field('adh_idh.ano_censo', 'year') .field('adh_idh.ano_censo', 'year')
.field('adh_idh.municipio_id', 'city_id') .field('adh_idh.municipio_id', 'city_id')
.field('adh_idh.estado_id', 'state_id') .field('adh_idh.estado_id', 'state_id')
...@@ -160,7 +160,7 @@ idhmApp.get('/', rqf.parse(), (req, res, next) => { ...@@ -160,7 +160,7 @@ idhmApp.get('/', rqf.parse(), (req, res, next) => {
.group('adh_idh.estado_id') .group('adh_idh.estado_id')
} else if ("city" in req.filter) { } else if ("city" in req.filter) {
req.sql.from('adh_idh') req.sql.from('adh_idh')
.field('adh_idh.idhm', 'IDHM') .field('adh_idh.idhm', 'total')
.field('adh_idh.ano_censo', 'year') .field('adh_idh.ano_censo', 'year')
.field('adh_idh.municipio_id', 'city_id') .field('adh_idh.municipio_id', 'city_id')
.group('adh_idh.idhm') .group('adh_idh.idhm')
...@@ -168,7 +168,7 @@ idhmApp.get('/', rqf.parse(), (req, res, next) => { ...@@ -168,7 +168,7 @@ idhmApp.get('/', rqf.parse(), (req, res, next) => {
.group('adh_idh.municipio_id') .group('adh_idh.municipio_id')
} else if ("city" in req.dims) { } else if ("city" in req.dims) {
req.sql.from('adh_idh') req.sql.from('adh_idh')
.field('adh_idh.idhm', 'IDHM') .field('adh_idh.idhm', 'total')
.field('adh_idh.ano_censo', 'year') .field('adh_idh.ano_censo', 'year')
.field('adh_idh.municipio_id', 'city_id') .field('adh_idh.municipio_id', 'city_id')
.group('adh_idh.idhm') .group('adh_idh.idhm')
......
...@@ -116,12 +116,12 @@ idhmrApp.get('/', rqf.parse(), (req, res, next) => { ...@@ -116,12 +116,12 @@ idhmrApp.get('/', rqf.parse(), (req, res, next) => {
} }
if ("state" in req.filter) { if ("state" in req.filter) {
req.sql.from('adh_idh_uf') 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.ano_censo', 'year')
.field('adh_idh_uf.estado_id', 'state_id'); .field('adh_idh_uf.estado_id', 'state_id');
} else if ("city" in req.filter) { } else if ("city" in req.filter) {
req.sql.from('adh_idh') 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.ano_censo', 'year')
.field('adh_idh.municipio_id', 'city_id'); .field('adh_idh.municipio_id', 'city_id');
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment