From 2542e3e7542ee951471dbc35ceb263c64a43cec8 Mon Sep 17 00:00:00 2001 From: Vytor Calixto <vytorcalixto@gmail.com> Date: Wed, 30 Aug 2017 11:04:04 -0300 Subject: [PATCH] Add source route to idhm --- src/libs/routes/idhm.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libs/routes/idhm.js b/src/libs/routes/idhm.js index f9336c5a..c757a0e7 100644 --- a/src/libs/routes/idhm.js +++ b/src/libs/routes/idhm.js @@ -65,6 +65,13 @@ idhmApp.get('/years', (req, res, next) => { next(); }, response('years')); +idhmApp.get('/source', (req, res, next) => { + req.sql.from('fonte') + .field('fonte', 'source') + .where('tabela = \'adh_idh\''); + next(); +}, query, response('source')); + idhmApp.get('/IDHM_level', (req, res, next) => { req.result = [ {id: null, name: 'Não classificada'}, -- GitLab