From efced9890ac3a4b336b68699399c129876e95106 Mon Sep 17 00:00:00 2001 From: Yeuoly Date: Wed, 30 Apr 2025 17:07:19 +0800 Subject: [PATCH] feat: add optional hidden property to endpoint items and filter hidden endpoints in endpoint card --- .../components/plugins/plugin-detail-panel/endpoint-card.tsx | 2 +- web/app/components/plugins/types.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx b/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx index 9ab0c5b9a3..cc3688aebc 100644 --- a/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx +++ b/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx @@ -149,7 +149,7 @@ const EndpointCard = ({ - {data.declaration.endpoints.map((endpoint, index) => ( + {data.declaration.endpoints.filter(endpoint => !endpoint.hidden).map((endpoint, index) => (
{endpoint.method}
diff --git a/web/app/components/plugins/types.ts b/web/app/components/plugins/types.ts index 5ed05d4523..f552d7c17a 100644 --- a/web/app/components/plugins/types.ts +++ b/web/app/components/plugins/types.ts @@ -36,6 +36,7 @@ export type PluginEndpointDeclaration = { export type EndpointItem = { path: string method: string + hidden?: boolean } export type EndpointListItem = {