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

Change region route to new db schema

parent fbfa487f
No related branches found
No related tags found
2 merge requests!116Release v1.0.0,!34Db simcaq dev2
...@@ -21,11 +21,11 @@ rqf.addField({ ...@@ -21,11 +21,11 @@ rqf.addField({
}).addValue({ }).addValue({
name: 'id', name: 'id',
table: 'regiao', table: 'regiao',
tableField: 'pk_regiao_id', tableField: 'id',
where: { where: {
relation: '=', relation: '=',
type: 'integer', type: 'integer',
field: 'pk_regiao_id', field: 'id',
table: 'regiao' table: 'regiao'
} }
}).addField({ }).addField({
...@@ -46,7 +46,7 @@ rqf.addField({ ...@@ -46,7 +46,7 @@ rqf.addField({
regionApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => { regionApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => {
req.sql.from('regiao') req.sql.from('regiao')
.field('pk_regiao_id', 'id') .field('id')
.field('nome', 'name'); .field('nome', 'name');
next(); next();
}, query, response('region')); }, query, response('region'));
......
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