From 0c65824cadf5ff133e7ac60ffd29846263784d2a Mon Sep 17 00:00:00 2001 From: Harry Date: Fri, 10 Oct 2025 18:13:28 +0800 Subject: [PATCH] fix(workflow): update API route for DraftWorkflowTriggerRunApi - Changed the route from "/apps//workflows/draft/trigger/run" to "/apps//workflows/draft/trigger/plugin/run" to reflect the new plugin-based trigger structure. - Updated corresponding URL in the useWorkflowRun hook to maintain consistency across the application. --- 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 a0220452e1..0939cf41fe 100644 --- a/api/controllers/console/app/workflow.py +++ b/api/controllers/console/app/workflow.py @@ -1081,7 +1081,7 @@ class DraftWorkflowTriggerNodeApi(Resource): ), 500 -@console_ns.route("/apps//workflows/draft/trigger/run") +@console_ns.route("/apps//workflows/draft/trigger/plugin/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 9817f71cc6..92793e02fb 100644 --- a/web/app/components/workflow-app/hooks/use-workflow-run.ts +++ b/web/app/components/workflow-app/hooks/use-workflow-run.ts @@ -189,7 +189,7 @@ export const useWorkflowRun = () => { console.error('handleRun: missing app id for trigger plugin run') return } - url = `/apps/${appDetail.id}/workflows/draft/trigger/run` + url = `/apps/${appDetail.id}/workflows/draft/trigger/plugin/run` } else if (appDetail?.mode === 'advanced-chat') { url = `/apps/${appDetail.id}/advanced-chat/workflows/draft/run`