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

Add route /class/years

parent c991ef99
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 #
...@@ -26,6 +26,12 @@ classApp.get('/year_range', (req, res, next) => { ...@@ -26,6 +26,12 @@ classApp.get('/year_range', (req, res, next) => {
next(); next();
}, query, response('range')); }, query, response('range'));
classApp.get('/years', (req, res, next) => {
req.sql.from('turma')
.field('DISTINCT turma.ano_censo', 'year');
next();
}, query, response('years'));
classApp.get('/location', (req, res, next) => { classApp.get('/location', (req, res, next) => {
req.sql = squel.select() req.sql = squel.select()
.field('id') .field('id')
......
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