diff --git a/src/libs/routes/idhml.js b/src/libs/routes/idhml.js index 08c7163027471b963d040e3d6511e6202bd2af73..3a36276aebde7dc949e8e9c3db5780ba4bebb0ca 100644 --- a/src/libs/routes/idhml.js +++ b/src/libs/routes/idhml.js @@ -25,14 +25,12 @@ idhmlApp.use(cache('15 day')); idhmlApp.get('/year_range', (req, res, next) => { req.sql.from('adh_idh') .field('MIN(adh_idh.ano_censo)', 'start_year') - .field('MAX(adh_idh.ano_censo)', 'end_year') - .where('adh_idh.ano_censo <> 2014 AND adh_idh.ano_censo <> 2013'); + .field('MAX(adh_idh.ano_censo)', 'end_year'); next(); }, query, (req, res, next) => { req.sql.from('adh_idh_uf') .field('MIN(adh_idh_uf.ano_censo)', 'start_year') - .field('MAX(adh_idh_uf.ano_censo)', 'end_year') - .where('adh_idh_uf.ano_censo <> 2014 AND adh_idh_uf.ano_censo <> 2013'); + .field('MAX(adh_idh_uf.ano_censo)', 'end_year'); req.old_result = req.result; next(); }, query, (req, res, next) => { @@ -47,8 +45,7 @@ idhmlApp.get('/year_range', (req, res, next) => { idhmlApp.get('/years', (req, res, next) => { req.sql.from('adh_idh') - .field('DISTINCT adh_idh.ano_censo', 'year') - .where('adh_idh.ano_censo <> 2014 AND adh_idh.ano_censo <> 2013'); + .field('DISTINCT adh_idh.ano_censo', 'year'); next(); }, query, (req, res, next) => { req.oldResult = req.result; @@ -56,8 +53,7 @@ idhmlApp.get('/years', (req, res, next) => { req.sql = squel.select(); req.sql.from('adh_idh_uf') - .field('DISTINCT adh_idh_uf.ano_censo', 'year') - .where('adh_idh_uf.ano_censo <> 2014 AND adh_idh_uf.ano_censo <> 2013'); + .field('DISTINCT adh_idh_uf.ano_censo', 'year'); next(); }, query, (req, res, next) => { let result = Object.assign(req.oldResult, req.result);