From 8f7bef95099a1544d9e960befa981dcdf4f84ace Mon Sep 17 00:00:00 2001 From: Harry Date: Wed, 15 Oct 2025 14:44:00 +0800 Subject: [PATCH] fix(trigger): Update API routes for draft workflow trigger - Changed the endpoint for triggering draft workflows from `/trigger/plugin/run` to `/trigger/run` in both backend and frontend to ensure consistency and clarity in the API structure. - Adjusted the URL construction in the `useWorkflowRun` hook to reflect the updated route. --- api/controllers/console/app/workflow.py | 2 +- web/app/components/workflow-app/hooks/use-workflow-run.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/controllers/console/app/workflow.py b/api/controllers/console/app/workflow.py index 6e0ddfa43e..f14db11576 100644 --- a/api/controllers/console/app/workflow.py +++ b/api/controllers/console/app/workflow.py @@ -1077,7 +1077,7 @@ class DraftWorkflowTriggerNodeApi(Resource): ), 500 -@console_ns.route("/apps//workflows/draft/trigger/plugin/run") +@console_ns.route("/apps//workflows/draft/trigger/run") class DraftWorkflowTriggerRunApi(Resource): """ Full workflow debug - Polling API for trigger events diff --git a/web/app/components/workflow-app/hooks/use-workflow-run.ts b/web/app/components/workflow-app/hooks/use-workflow-run.ts index f0ff480d7b..1a8a9568e6 100644 --- a/web/app/components/workflow-app/hooks/use-workflow-run.ts +++ b/web/app/components/workflow-app/hooks/use-workflow-run.ts @@ -175,7 +175,7 @@ export const useWorkflowRun = () => { console.error('handleRun: missing app id for trigger plugin run') return } - url = `/apps/${appDetail.id}/workflows/draft/trigger/plugin/run` + url = `/apps/${appDetail.id}/workflows/draft/trigger/run` } else if (appDetail?.mode === 'advanced-chat') { url = `/apps/${appDetail.id}/advanced-chat/workflows/draft/run`