Skip to content
Snippets Groups Projects
Commit 863375b5 authored by Fernando Gbur dos Santos's avatar Fernando Gbur dos Santos
Browse files

[FIX] Subroute '/new_pnad_state changed to '/state', '/reg_code' to '/region'...

[FIX] Subroute '/new_pnad_state changed to '/state', '/reg_code' to '/region' and '/age_range' to '/age_range_all'
parent 0475af46
No related branches found
No related tags found
3 merge requests!391Hom -> Prod,!390dev -> homologa,!389new_pnad -> dev
......@@ -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) {
......
......@@ -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',
......
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