Skip to content
Snippets Groups Projects
Commit fca5e0c3 authored by Fernando Erd's avatar Fernando Erd :ok_hand:
Browse files

Add school_name return

parent bea5eaa3
No related branches found
No related tags found
3 merge requests!150Portal mec school,!146Portal mec inep,!145v1.6.0
Pipeline #17198 failed
...@@ -46,12 +46,14 @@ rqf.addField({ ...@@ -46,12 +46,14 @@ rqf.addField({
portalMecInepApp.get('/', rqf.parse(), (req, res, next) => { portalMecInepApp.get('/', rqf.parse(), (req, res, next) => {
req.sql.field('DISTINCT escola.id', 'id') req.sql.field('DISTINCT escola.id', 'id')
.field('escola.nome_escola', 'school_name')
.from('escola') .from('escola')
.join('estado', null, 'estado.id=escola.estado_id') .join('estado', null, 'estado.id=escola.estado_id')
.field('estado.nome', 'state_name') .field('estado.nome', 'state_name')
.join('municipio', null, 'municipio.id=escola.municipio_id') .join('municipio', null, 'municipio.id=escola.municipio_id')
.field('municipio.nome', 'city_name') .field('municipio.nome', 'city_name')
next(); next();
}, rqf.build(), query, response('portalMec_inep')); }, rqf.build(), query, response('portalMec_inep'));
......
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