Skip to content

Commit 6ca36dd

Browse files
committed
Fix
1 parent 0275e54 commit 6ca36dd

File tree

1 file changed

+2
-2
lines changed
  • apps/sim/app/api/function/execute

1 file changed

+2
-2
lines changed

apps/sim/app/api/function/execute/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createLogger } from '@sim/logger'
22
import { type NextRequest, NextResponse } from 'next/server'
3-
import { checkSessionOrInternalAuth } from '@/lib/auth/hybrid'
3+
import { checkInternalAuth } from '@/lib/auth/hybrid'
44
import { isE2bEnabled } from '@/lib/core/config/feature-flags'
55
import { generateRequestId } from '@/lib/core/utils/request'
66
import { executeInE2B } from '@/lib/execution/e2b'
@@ -582,7 +582,7 @@ export async function POST(req: NextRequest) {
582582
let resolvedCode = '' // Store resolved code for error reporting
583583

584584
try {
585-
const auth = await checkSessionOrInternalAuth(req)
585+
const auth = await checkInternalAuth(req)
586586
if (!auth.success || !auth.userId) {
587587
logger.warn(`[${requestId}] Unauthorized function execution attempt`)
588588
return NextResponse.json({ error: auth.error || 'Unauthorized' }, { status: 401 })

0 commit comments

Comments
 (0)