From ab718ff2929d8e2b2db18c0e092f808bedceccf9 Mon Sep 17 00:00:00 2001 From: Siddharth Ganesan Date: Sat, 2 Aug 2025 16:08:01 -0700 Subject: [PATCH] Temp logs --- apps/sim/app/api/copilot/chat/route.ts | 17 ----------------- apps/sim/lib/logs/console/logger.ts | 4 ++-- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/apps/sim/app/api/copilot/chat/route.ts b/apps/sim/app/api/copilot/chat/route.ts index 092ae01fae3..b8858832b9c 100644 --- a/apps/sim/app/api/copilot/chat/route.ts +++ b/apps/sim/app/api/copilot/chat/route.ts @@ -123,23 +123,6 @@ export async function POST(req: NextRequest) { const session = await getSession() let authenticatedUserId: string | null = session?.user?.id || null - // If no session, check for API key auth - if (!authenticatedUserId) { - const apiKeyHeader = req.headers.get('x-api-key') - if (apiKeyHeader) { - // Verify API key - const [apiKeyRecord] = await db - .select({ userId: apiKeyTable.userId }) - .from(apiKeyTable) - .where(eq(apiKeyTable.key, apiKeyHeader)) - .limit(1) - - if (apiKeyRecord) { - authenticatedUserId = apiKeyRecord.userId - } - } - } - if (!authenticatedUserId) { return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }) } diff --git a/apps/sim/lib/logs/console/logger.ts b/apps/sim/lib/logs/console/logger.ts index 8c77293b262..5f67ea0bc80 100644 --- a/apps/sim/lib/logs/console/logger.ts +++ b/apps/sim/lib/logs/console/logger.ts @@ -44,8 +44,8 @@ const LOG_CONFIG = { colorize: true, }, production: { - enabled: false, // Disable all console logs in production - minLevel: LogLevel.ERROR, + enabled: true, // Enable console logs in production + minLevel: LogLevel.INFO, // Show INFO, WARN, and ERROR logs colorize: false, }, test: {