File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
apps/sim/app/api/workflows/[id]/execute Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import { executeWorkflowCore } from '@/lib/workflows/executor/execution-core'
1515import { type ExecutionEvent , encodeSSEEvent } from '@/lib/workflows/executor/execution-events'
1616import { PauseResumeManager } from '@/lib/workflows/executor/human-in-the-loop-manager'
1717import { createStreamingResponse } from '@/lib/workflows/streaming'
18+ import { createHttpResponseFromBlock , workflowHasResponseBlock } from '@/lib/workflows/utils'
1819import { validateWorkflowAccess } from '@/app/api/workflows/middleware'
1920import { type ExecutionMetadata , ExecutionSnapshot } from '@/executor/execution/snapshot'
2021import type { StreamingExecution } from '@/executor/types'
@@ -495,6 +496,11 @@ export async function POST(req: NextRequest, { params }: { params: Promise<{ id:
495496 loggingSession,
496497 } )
497498
499+ const hasResponseBlock = workflowHasResponseBlock ( result )
500+ if ( hasResponseBlock ) {
501+ return createHttpResponseFromBlock ( result )
502+ }
503+
498504 const filteredResult = {
499505 success : result . success ,
500506 output : result . output ,
You can’t perform that action at this time.
0 commit comments