framework-do-dede 5.5.4 → 5.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,9 +28,11 @@ export default class HttpServer {
28
28
  mountRoute(httpServerParams) {
29
29
  const params = httpServerParams.params?.map((param) => param.split('|')[0]);
30
30
  if (params && params.length > 0) {
31
- const paramsMounted = params.map((v) => {
32
- return v.includes('_') ? `${v.replace('_', '/')}` : `/:${v}`;
33
- }).join('');
31
+ const routeSegments = httpServerParams.route.split('/');
32
+ const paramsMounted = params
33
+ .filter((v) => !routeSegments.includes(`:${v}`))
34
+ .map((v) => `/:${v}`)
35
+ .join('');
34
36
  return `${httpServerParams.route}${paramsMounted}`;
35
37
  }
36
38
  return httpServerParams.route;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "framework-do-dede",
3
- "version": "5.5.4",
3
+ "version": "5.5.5",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",