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

Fix bug in /city/state/:id route

Missing .toParam() method in squel
parent e3960564
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -29,7 +29,7 @@ cityApp.get('/ibge/:id', (req, res, next) => {
cityApp.get('/state/:id', (req, res, next) => {
req.sql = squel.select().from('municipios').where('fk_estado_id = ?',
parseInt(req.params.id, 10));
parseInt(req.params.id, 10)).toParam();
next();
}, query, response('city'));
......
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