Skip to content
Snippets Groups Projects
Commit 385740b0 authored by Vytor Calixto's avatar Vytor Calixto :space_invader:
Browse files

Fix ethnic group in out of school route

parent 919b5778
No related branches found
No related tags found
1 merge request!124Release v1.1.0
Pipeline #
......@@ -56,15 +56,17 @@ outOfSchoolApp.get('/full_age_range', (req, res, next) => {
next();
}, response('full_age_range'));
outOfSchoolApp.get('/ethnic_group_pnad', (req, res, next) => {
outOfSchoolApp.get('/ethnic_group', (req, res, next) => {
req.result = [
{id: 0, name: 'Indígena'},
{id: 1, name: 'Branca e amarela'},
{id: 2, name: 'Preta e parda'},
{id: 9, name: 'Sem declaração'}
{id: 0, name: 'Sem declaração'},
{id: 1, name: 'Branca'},
{id: 2, name: 'Preta'},
{id: 3, name: 'Parda'},
{id: 4, name: 'Amarela'},
{id: 5, name: 'Indígena'}
];
next();
}, response('ethnic_group_pnad'));
}, response('ethnic_group'));
outOfSchoolApp.get('/location', (req, res, next) => {
req.result = [
......@@ -142,14 +144,14 @@ rqf.addField({
foreignTable: 'pnad'
}
}).addValue({
name: 'ethnic_group_pnad',
name: 'ethnic_group',
table: 'pnad',
tableField: 'cor_raca',
resultField: 'ethnic_group_pnad_id',
tableField: 'cor_raca_id',
resultField: 'ethnic_group_id',
where: {
relation: '=',
type: 'integer',
field: 'cor_raca'
field: 'cor_raca_id'
}
}).addValue({
name: 'min_year',
......@@ -176,7 +178,7 @@ rqf.addField({
}).addValue({
name: 'full_age_range',
table: 'pnad',
tableField: 'idade_31_03',
tableField: 'faixa_etaria_31_03',
resultField: 'full_age_range_id',
where: {
relation: '=',
......
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