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

start pib per capita route

parent 9ff68430
No related branches found
No related tags found
2 merge requests!116Release v1.0.0,!58Pib per capita e População
Pipeline #
const express = require('express');
const pibpercapitaApp = express.Router();
const libs = `${process.cwd()}/libs`;
const log = require(`${libs}/log`)(module);
const squel = require('squel');
const query = require(`${libs}/middlewares/query`);
const response = require(`${libs}/middlewares/response`);
const ReqQueryFields = require(`${libs}/middlewares/reqQueryFields`);
const id2str = require(`${libs}/middlewares/id2str`);
let rqf = new ReqQueryFields();
idhmrApp.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');
next();
}, query, response('range'));
rqf.addField({
name: 'filter',
field: false,
where: true
}).addField({
name: 'dims',
field: true,
where: false
})
module.exports = pibpercapitaApp;
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