diff --git a/src/libs/routes/city.js b/src/libs/routes/city.js index af22a1b77410369804c514c38d3ff18b72b3038f..aa28900b9f29972aa0d5d8c01c85aba8fd54bd17 100644 --- a/src/libs/routes/city.js +++ b/src/libs/routes/city.js @@ -1,9 +1,13 @@ const express = require('express'); + const cityApp = express(); + const libs = `${process.cwd()}/libs`; -const log = require(`${libs}/log`)(module); + const squel = require('squel'); + const query = require(`${libs}/middlewares/query`); + const response = require(`${libs}/middlewares/response`); cityApp.get('/', (req, res, next) => { @@ -19,7 +23,7 @@ cityApp.get('/:id', (req, res, next) => { cityApp.get('/ibge/:id', (req, res, next) => { req.query = squel.select().from('municipios').where('codigo_ibge = ?', - parseInt(req.params.id, 10)).toParam(); + req.params.id).toParam(); next(); }, query, response);