From 4b212084f8ebc41aad9c63792fda288c411f6ea6 Mon Sep 17 00:00:00 2001 From: sealday Date: Fri, 15 Mar 2024 20:40:05 +0800 Subject: [PATCH] fix: post data error --- .../plugin-core/src/client/schema-components/GroupBlock.tsx | 3 ++- .../plugin-rental/src/server/actions/records-controller.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/plugins/@hera/plugin-core/src/client/schema-components/GroupBlock.tsx b/packages/plugins/@hera/plugin-core/src/client/schema-components/GroupBlock.tsx index edff48967..6cfea2605 100644 --- a/packages/plugins/@hera/plugin-core/src/client/schema-components/GroupBlock.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/schema-components/GroupBlock.tsx @@ -45,7 +45,8 @@ export const GroupBlock = (props) => { return [ await api.request({ url: requeatItem.fieldFormat.requestUrl, - params: { + method: 'POST', + data: { filter: { ...filter }, collection: params.collection, }, diff --git a/packages/plugins/@hera/plugin-rental/src/server/actions/records-controller.ts b/packages/plugins/@hera/plugin-rental/src/server/actions/records-controller.ts index 88e75056e..1f7fa698e 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/actions/records-controller.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/actions/records-controller.ts @@ -19,7 +19,7 @@ export class RecordPreviewController { @Action('group') async group(ctx: Context) { - const { collection: collectionName, filter } = ctx.action.params; + const { collection: collectionName, filter } = ctx.action.params.values; const collection = ctx.db.getCollection(collectionName); const fields = collection.fields; const filterParser = new FilterParser(filter, {