From 641a19ff1864cc98c4929e66d9b8b31543794113 Mon Sep 17 00:00:00 2001 From: Gustavo Gondim Date: Mon, 28 Aug 2023 13:51:42 -0300 Subject: [PATCH 1/2] fix: #331 mergeParams always true for internal services --- src/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/index.js b/src/index.js index 311c7db5..8ee993ae 100644 --- a/src/index.js +++ b/src/index.js @@ -452,6 +452,11 @@ module.exports = { urlPath = urlPath.replace(this._isscRe, "$"); let action = urlPath; + // #331 Always merge parameters for internal services + if (urlPath.indexOf("$") !== -1) { + route.opts.mergeParams = true; + } + // Resolve aliases if (foundAlias) { const alias = foundAlias.alias; From 4e4b365823d007b4db47a2404aba2ea1b619ade5 Mon Sep 17 00:00:00 2001 From: Gustavo Gondim Date: Wed, 30 Aug 2023 15:46:08 -0300 Subject: [PATCH 2/2] Including @freezystem's suggestion Co-authored-by: Nico --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 8ee993ae..cb71219c 100644 --- a/src/index.js +++ b/src/index.js @@ -453,7 +453,7 @@ module.exports = { let action = urlPath; // #331 Always merge parameters for internal services - if (urlPath.indexOf("$") !== -1) { + if (action.startsWith("$")) { route.opts.mergeParams = true; }