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

Remove 2013 and 2014 from classroom route

parent 37d8aed1
No related branches found
No related tags found
1 merge request!116Release v1.0.0
Pipeline #
...@@ -26,14 +26,15 @@ let rqfCount = new ReqQueryFields(); ...@@ -26,14 +26,15 @@ let rqfCount = new ReqQueryFields();
// Returns a tuple of start and ending years of the complete enrollments dataset. // Returns a tuple of start and ending years of the complete enrollments dataset.
classroomApp.get('/year_range', (req, res, next) => { classroomApp.get('/year_range', (req, res, next) => {
req.sql.from('escola') req.sql.from('escola')
.field('MIN(escola.ano_censo)', 'start_year') .field('2015', 'start_year')
.field('MAX(escola.ano_censo)', 'end_year'); .field('2016', 'end_year');
next(); next();
}, query, response('range')); }, query, response('range'));
classroomApp.get('/years', (req, res, next) => { classroomApp.get('/years', (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 <> 2013 AND 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