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

Add years 2013 and 2014 to route pibpercapita

parent ed021b67
No related branches found
No related tags found
1 merge request!116Release v1.0.0
Pipeline #
......@@ -27,15 +27,13 @@ pibpercapitaApp.use(cache('15 day'));
pibpercapitaApp.get('/year_range', (req, res, next) => {
req.sql.from('ibge_pib')
.field('MIN(ibge_pib.ano_censo)', 'start_year')
.field('MAX(ibge_pib.ano_censo)', 'end_year')
.where('ibge_pib.ano_censo <> 2014 AND ibge_pib.ano_censo <> 2013');
.field('MAX(ibge_pib.ano_censo)', 'end_year');
next();
}, query, response('range'));
pibpercapitaApp.get('/years', (req, res, next) => {
req.sql.from('ibge_pib').
field('DISTINCT ibge_pib.ano_censo', 'year')
.where('ibge_pib.ano_censo <> 2014 AND ibge_pib.ano_censo <> 2013');
field('DISTINCT ibge_pib.ano_censo', 'year');
next();
}, query, response('years'));
......
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