diff --git a/src/libs/convert/citySize.js b/src/libs/convert/citySize.js index 819eb150e8a91e9546cf6935ce7b000b63242789..3f50462b097d9340a0d7973460412a463aca7a17 100644 --- a/src/libs/convert/citySize.js +++ b/src/libs/convert/citySize.js @@ -1,7 +1,7 @@ module.exports = function citySize(id) { switch (id) { case 1: - return 'até 5000'; + return '0 - 5000'; case 2: return '5001 - 10000'; case 3: diff --git a/src/libs/routes/infrastructure.js b/src/libs/routes/infrastructure.js index 290bf1a0c393db0545c3e4d88dfc736dc6be5b0d..8b01e338f0c7785a14fe29f93a7f54f2fc2c6582 100644 --- a/src/libs/routes/infrastructure.js +++ b/src/libs/routes/infrastructure.js @@ -67,19 +67,26 @@ infrastructureApp.get('/rural_location', (req, res, next) => { }, response('rural_location')); infrastructureApp.get('/adm_dependency', (req, res, next) => { - req.sql.from('dependencia_adm') - .field('id') - .field('nome', 'name') - .where('id <= 4'); + req.result = []; + for(let i = 1; i <= 4; ++i) { + req.result.push({ + id: i, + name: id2str.admDependency(i) + }); + }; next(); -}, query, response('adm_dependency')); +}, response('adm_dependency')); infrastructureApp.get('/adm_dependency_detailed', (req, res, next) => { - req.sql.from('dependencia_adm_priv') - .field('id', 'id') - .field('nome', 'name'); + req.result = []; + for(let i = 1; i <= 6; ++i) { + req.result.push({ + id: i, + name: id2str.admDependencyPriv(i) + }); + }; next(); -}, query, response('adm_dependency_detailed')); +}, response('adm_dependency_detailed')); rqf.addField({ name: 'filter', diff --git a/src/libs/routes/population.js b/src/libs/routes/population.js index cd307cdbcbb70b797c76d92b3550a0e3d9306604..f0402daa73c13eb6453b4e3d584bfe11b8145a01 100644 --- a/src/libs/routes/population.js +++ b/src/libs/routes/population.js @@ -41,7 +41,7 @@ populationApp.get('/years', (req, res, next) => { populationApp.get('/city_size', (req, res, next) => { req.result = [ - {id: 1, name: "até 5000"}, + {id: 1, name: "0 - 5000"}, {id: 2, name: "5001 - 10000"}, {id: 3, name: "10001 - 20000"}, {id: 4, name: "20001 - 50000"},