Skip to content
Snippets Groups Projects
Commit 93bee174 authored by Gabriel Ruschel's avatar Gabriel Ruschel
Browse files

Remove year > 2014 restriction

parent ef808fa0
No related branches found
No related tags found
1 merge request!132Issue/403
Pipeline #16212 canceled
...@@ -36,14 +36,12 @@ schoolApp.get('/year_range', cache('15 day'), (req, res, next) => { ...@@ -36,14 +36,12 @@ schoolApp.get('/year_range', cache('15 day'), (req, res, next) => {
req.sql.from('escola') req.sql.from('escola')
.field('MIN(escola.ano_censo)', 'start_year') .field('MIN(escola.ano_censo)', 'start_year')
.field('MAX(escola.ano_censo)', 'end_year') .field('MAX(escola.ano_censo)', 'end_year')
.where('escola.ano_censo > 2014');
next(); next();
}, query, response('range')); }, query, response('range'));
schoolApp.get('/years', cache('15 day'), (req, res, next) => { schoolApp.get('/years', cache('15 day'), (req, res, next) => {
req.sql.from('escola'). req.sql.from('escola').
field('DISTINCT escola.ano_censo', 'year') field('DISTINCT escola.ano_censo', 'year')
.where('escola.ano_censo > 2014');
next(); next();
}, query, response('years')); }, 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