Skip to content
Snippets Groups Projects

Merge new updates into master

1 file
+ 7
6
Compare changes
  • Side-by-side
  • Inline
+ 7
6
@@ -30,6 +30,7 @@ const cache = require('apicache').options({ debug: config.debug, statusCodes: {i
let rqf = new ReqQueryFields();
let rqfCount = new ReqQueryFields();
// cubApp.get('/year_range', (req, res, next) => {
// req.sql.from('cub')
@@ -70,7 +71,7 @@ rqf.addField({
name: 'dims',
field: true,
where: false
}).addValue({
}).addValueToField({
name: 'state',
table: 'estado',
tableField: ['sigla', 'id'],
@@ -86,7 +87,7 @@ rqf.addField({
foreign: 'estado_id',
foreignTable: 'numero_estudantes_aee'
}
}).addValueToField({
}, 'filter').addValueToField({
name: 'city',
table: 'municipio',
tableField: 'nome',
@@ -102,7 +103,7 @@ rqf.addField({
foreign: 'municipio_id',
foreignTable: 'numero_estudantes_aee'
}
}).addValue({
}, 'filter').addValue({
name: 'region',
table: 'regiao',
tableField: ['nome', 'id'],
@@ -128,7 +129,7 @@ rqf.addField({
type: 'integer',
field: 'id'
},
}).addValueToField({
}, 'filter').addValueToField({
name: 'locale_id',
table: 'numero_estudantes_aee',
tableField: 'localizacao_id',
@@ -200,13 +201,13 @@ rqf.addField({
}
});
studentsAeeApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => {
studentsAeeApp.get('/', rqf.parse(), (req, res, next) => {
req.sql.from('numero_estudantes_aee')
.field('ano_censo')
.field('COUNT(distinct id_aluno)')
.group('ano_censo')
.order('ano_censo')
next();
}, query, id2str.transform(), response('studentsAee'));
}, rqf.build(), query, id2str.transform(), response('studentsAee'));
module.exports = studentsAeeApp;
Loading