Skip to content

Commit 2513385

Browse files
committed
Fix
1 parent 0cf3aa5 commit 2513385

File tree

1 file changed

+5
-3
lines changed
  • apps/sim/app/api/resume/[workflowId]/[executionId]/[contextId]

1 file changed

+5
-3
lines changed

apps/sim/app/api/resume/[workflowId]/[executionId]/[contextId]/route.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@ export async function POST(
2121
) {
2222
const { workflowId, executionId, contextId } = await params
2323

24-
const access = await validateWorkflowAccess(request, workflowId, false)
24+
// Require deployed workflow and valid API key (same as webhook triggers)
25+
const access = await validateWorkflowAccess(request, workflowId, true)
2526
if (access.error) {
2627
return NextResponse.json({ error: access.error.message }, { status: access.error.status })
2728
}
2829

29-
const workflow = access.workflow!
30+
const workflow = access.workflow
3031

3132
let payload: any = {}
3233
try {
@@ -148,7 +149,8 @@ export async function GET(
148149
) {
149150
const { workflowId, executionId, contextId } = await params
150151

151-
const access = await validateWorkflowAccess(request, workflowId, false)
152+
// Require deployed workflow and valid API key (same as webhook triggers)
153+
const access = await validateWorkflowAccess(request, workflowId, true)
152154
if (access.error) {
153155
return NextResponse.json({ error: access.error.message }, { status: access.error.status })
154156
}

0 commit comments

Comments
 (0)