File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
apps/sim/app/api/tools/command/exec Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 1+ import { createLogger } from '@sim/logger'
12import { spawn } from "child_process" ;
23import { NextRequest , NextResponse } from "next/server" ;
34import type { CommandInput , CommandOutput } from "@/tools/command/types" ;
4-
55import { getSession } from '@/lib/auth'
66
7+ const logger = createLogger ( 'CommandExecAPI' )
8+
79export async function POST ( request : NextRequest ) {
810 try {
911 const session = await getSession ( )
@@ -75,11 +77,6 @@ import { validatePathSegment } from '@/lib/core/security/input-validation'
7577
7678 return NextResponse . json ( output ) ;
7779 } catch ( error ) {
78- import { createLogger } from '@sim/logger'
79-
80- const logger = createLogger ( 'CommandExecAPI' )
81-
82- // Then replace console.error with:
8380 logger . error ( 'Command execution error:' , { error } )
8481 return NextResponse . json (
8582 {
You can’t perform that action at this time.
0 commit comments