diff --git a/modules/agency/back/methods/zone/getLeaves.js b/modules/agency/back/methods/zone/getLeaves.js
index d919f97ac..50ee54345 100644
--- a/modules/agency/back/methods/zone/getLeaves.js
+++ b/modules/agency/back/methods/zone/getLeaves.js
@@ -4,9 +4,10 @@ module.exports = Self => {
description: 'Returns the nodes for a zone',
accepts: [
{
- arg: 'zoneFk',
+ arg: 'id',
type: 'Number',
- required: true,
+ http: {source: 'path'},
+ required: true
}, {
arg: 'parentFk',
type: 'Number',
@@ -22,15 +23,15 @@ module.exports = Self => {
root: true
},
http: {
- path: `/getLeaves`,
+ path: `/:id/getLeaves`,
verb: 'GET'
}
});
- Self.getLeaves = async(zoneFk, parentFk = null, search) => {
+ Self.getLeaves = async(id, parentFk = null, search) => {
let [res] = await Self.rawSql(
`CALL zone_getLeaves(?, ?, ?)`,
- [zoneFk, parentFk, search]
+ [id, parentFk, search]
);
let map = new Map();
diff --git a/modules/agency/front/location/index.html b/modules/agency/front/location/index.html
index 53957faf7..c45fd5cd6 100644
--- a/modules/agency/front/location/index.html
+++ b/modules/agency/front/location/index.html
@@ -1,8 +1,7 @@