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

Add route /pibpercapita/years

parent 00b5bd9c
No related branches found
No related tags found
2 merge requests!116Release v1.0.0,!67#296: Nova resposta para os anos da API
Pipeline #
...@@ -25,6 +25,12 @@ pibpercapitaApp.get('/year_range', (req, res, next) => { ...@@ -25,6 +25,12 @@ pibpercapitaApp.get('/year_range', (req, res, next) => {
next(); next();
}, query, response('range')); }, query, response('range'));
pibpercapitaApp.get('/years', (req, res, next) => {
req.sql.from('ibge_pib').
field('DISTINCT ibge_pib.ano_censo', 'years');
next();
}, query, response('years'));
pibpercapitaApp.get('/income_level', (req, res, next) => { pibpercapitaApp.get('/income_level', (req, res, next) => {
req.result = [ req.result = [
{id: 1, name: "1º quintil – 20% menores"}, {id: 1, name: "1º quintil – 20% menores"},
......
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