Skip to content

Commit bb3b4df

Browse files
committed
fix: make sure the 'path' parameter from the router endoint doesn't end up on the document service query params
1 parent 454584d commit bb3b4df

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/better-chefs-clap.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"strapi-plugin-webtools": patch
3+
---
4+
5+
fix: make sure the 'path' parameter from the router endoint doesn't end up on the document service query params

packages/core/server/controllers/core.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import { sanitizeOutput } from '../util/sanitizeOutput';
1111

1212
export default {
1313
router: async (ctx: Context) => {
14-
const { path } = ctx.query;
14+
const { path, ...searchQuery } = ctx.query;
1515
const { auth } = ctx.state;
1616

17-
const { entity, contentType } = await getPluginService('url-alias').findRelatedEntity(path as string, ctx.query);
17+
const { entity, contentType } = await getPluginService('url-alias').findRelatedEntity(path as string, searchQuery);
1818

1919
if (!entity) {
2020
ctx.notFound();

0 commit comments

Comments
 (0)