Skip to content
Snippets Groups Projects
Commit 06e62ed6 authored by Lucas Gabriel Lima's avatar Lucas Gabriel Lima
Browse files

add auxiliary route income_level por pib per capita

parent f6b211bc
No related branches found
No related tags found
2 merge requests!116Release v1.0.0,!58Pib per capita e População
Pipeline #
......@@ -25,6 +25,17 @@ pibpercapitaApp.get('/year_range', (req, res, next) => {
next();
}, query, response('range'));
pibpercapitaApp.get('/income_level', (req, res, next) => {
req.result = [
{id: 1, name: "1º quintil – 20% menores"},
{id: 2, name: "2º quintil"},
{id: 3, name: "3º quintil"},
{id: 4, name: "4º quintil"},
{id: 5, name: "5º quintil – 20% maiores"},
];
next();
}, response('income_level'));
rqf.addField({
name: 'filter',
field: false,
......@@ -85,6 +96,16 @@ rqf.addField({
type: 'integer',
field: 'ano_censo'
}
}).addValue({
name: 'income_level',
table: 'ibge_pib',
tableField: 'nivel_renda_per_capita',
resultField: 'income_level_id',
where: {
relation: '=',
type: 'integer',
field: 'nivel_renda_per_capita'
}
});
pibpercapitaApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => {
......
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