diff --git a/src/libs/middlewares/id2str.js b/src/libs/middlewares/id2str.js index 8141d1f6706fd92ed7a716e398bbf18cd93400dc..d15505d31fc165e79b4e2033b10eb6cecf02c184 100644 --- a/src/libs/middlewares/id2str.js +++ b/src/libs/middlewares/id2str.js @@ -220,8 +220,7 @@ const ids = { reg_code_id: regionCode, metro_code_id: metroCode, modality_shift_id: modalityShift, - income_range_id: incomeRange, - new_pnad_state_id: stateName + income_range_id: incomeRange }; function transform(removeId=false) { diff --git a/src/libs/routes_v1/newPnad.js b/src/libs/routes_v1/newPnad.js index 800d5adc9c045c3745e1311704205bb0755860d9..09b292fceabe8d5beb74a90f5d8e9113db8d1df8 100644 --- a/src/libs/routes_v1/newPnad.js +++ b/src/libs/routes_v1/newPnad.js @@ -229,7 +229,7 @@ PnadNovoApp.get('/modality_shift', (req, res, next) => { next(); }, response('modality_shift')); -PnadNovoApp.get('/new_pnad_state', (req, res, next) => { +PnadNovoApp.get('/state', (req, res, next) => { req.result = [] for (let i = 11; i < 54; i++) { if (id2str.stateName(i) !== 'Não declarada') { @@ -241,9 +241,9 @@ PnadNovoApp.get('/new_pnad_state', (req, res, next) => { req.result.push({id: 99, name: id2str.stateName(99)}); next(); -}, response('new_pnad_state')); +}, response('state')); -PnadNovoApp.get('/age_range', (req, res, next) => { +PnadNovoApp.get('/age_range_all', (req, res, next) => { req.result = [] for (let i = 1; i < 12; i++) { req.result.push({ @@ -252,7 +252,7 @@ PnadNovoApp.get('/age_range', (req, res, next) => { } next(); -}, response('age_range')); +}, response('age_range_all')); rqf.addField({ @@ -273,7 +273,7 @@ rqf.addField({ field: 'id' } }).addValue({ - name: 'new_pnad_state', + name: 'state', table: 'estado', tableField: ['nome', 'id'], resultField: ['state_name', 'state_id'], @@ -404,7 +404,7 @@ rqf.addField({ field: 'cor_raca' } }).addValue({ - name: 'age_range', + name: 'age_range_all', table: 'pnad_novo', tableField: 'faixa_etaria', resultField: 'age_range_all_id',