File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
apps/sim/app/api/function/execute Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 11import { createLogger } from '@sim/logger'
22import { type NextRequest , NextResponse } from 'next/server'
3- import { checkSessionOrInternalAuth } from '@/lib/auth/hybrid'
3+ import { checkInternalAuth } from '@/lib/auth/hybrid'
44import { isE2bEnabled } from '@/lib/core/config/feature-flags'
55import { generateRequestId } from '@/lib/core/utils/request'
66import { 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 } )
You can’t perform that action at this time.
0 commit comments