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

Add location_detailed route to infrastructure

parent cc74bde4
No related branches found
No related tags found
2 merge requests!116Release v1.0.0,!85Indicador infraestrutura
Pipeline #
...@@ -29,6 +29,7 @@ const ids = { ...@@ -29,6 +29,7 @@ const ids = {
adm_dependency_detailed_id: admDependencyPriv, adm_dependency_detailed_id: admDependencyPriv,
location_id: location, location_id: location,
rural_location_id: ruralLocation, rural_location_id: ruralLocation,
location_detailed_id: ruralLocation,
ethnic_group_id: ethnicGroup, ethnic_group_id: ethnicGroup,
agreement_id: agreement, agreement_id: agreement,
integral_time_id: booleanVariable, integral_time_id: booleanVariable,
......
...@@ -52,7 +52,17 @@ infrastructureApp.get('/location', cache('15 day'), (req, res, next) => { ...@@ -52,7 +52,17 @@ infrastructureApp.get('/location', cache('15 day'), (req, res, next) => {
next(); next();
}, response('location')); }, response('location'));
//TODO: location_detailed infrastructureApp.get('/location_detailed', (req, res, next) => {
req.result = [
{id: 1, name: "Urbana"},
{id: 2, name: "Rural"},
{id: 3, name: "Rural - Área de assentamento"},
{id: 4, name: "Rural - Terra indígena"},
{id: 5, name: "Rural - Área remanescente de quilombos"},
{id: 6, name: "Rural - Unidade de uso sustentável"}
];
next();
}, response('location_detailed'));
infrastructureApp.get('/adm_dependency', (req, res, next) => { infrastructureApp.get('/adm_dependency', (req, res, next) => {
req.sql.from('dependencia_adm') req.sql.from('dependencia_adm')
......
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