Skip to content
Snippets Groups Projects
Commit 9b31c6d1 authored by Gabriel Ruschel's avatar Gabriel Ruschel
Browse files

Merge branch 'idhm_routes_hotfix' into 'development'

Idhm routes hotfix

See merge request !63
parents f090feec 83301101
No related branches found
No related tags found
2 merge requests!116Release v1.0.0,!63Idhm routes hotfix
Pipeline #
...@@ -115,7 +115,7 @@ idhmeApp.get('/', rqf.parse(), (req, res, next) => { ...@@ -115,7 +115,7 @@ idhmeApp.get('/', rqf.parse(), (req, res, next) => {
.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_e', 'IDHME') .field('adh_idh.idhm_e', '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');
} else { } else {
......
...@@ -109,12 +109,12 @@ idhmlApp.get('/', rqf.parse(), (req, res, next) => { ...@@ -109,12 +109,12 @@ idhmlApp.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_l', 'IDHML') .field('adh_idh_uf.idhm_l', '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_l', 'IDHML') .field('adh_idh.idhm_l', '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');
} else { } else {
......
...@@ -46,7 +46,7 @@ describe('request idhml', () => { ...@@ -46,7 +46,7 @@ describe('request idhml', () => {
res.should.be.json; res.should.be.json;
res.body.should.have.property('result'); res.body.should.have.property('result');
res.body.result.should.be.a('array'); res.body.result.should.be.a('array');
res.body.result[0].should.have.property('IDHML'); res.body.result[0].should.have.property('total');
res.body.result[0].should.have.property('year'); res.body.result[0].should.have.property('year');
res.body.result[0].should.have.property('state_id'); res.body.result[0].should.have.property('state_id');
done(); done();
......
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