Skip to content
Snippets Groups Projects

Refactor enrollments route to include query building

Merged João Victor Risso requested to merge refactor_enrollments into development
2 files
+ 4
4
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -52,9 +52,9 @@ cityApp.get('/:id', function (req, res) {
cityApp.get('/ibge/:id', function (req, res) {
var citySql = 'SELECT * FROM municipios WHERE codigo_ibge = ?';
var cityId = parseInt(req.params.id, 10);
var cityIbgeCode = req.params.id;
conn.prepare(citySql, true).then(function (dbQuery) {
dbQuery.exec([cityId]).then(function (dbResult) {
dbQuery.exec([cityIbgeCode]).then(function (dbResult) {
log.debug(dbResult);
req.result = dbResult;
response(req, res);
Loading