From e8b05ae420e0dc4acac20dde5be058517289f280 Mon Sep 17 00:00:00 2001 From: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com> Date: Sat, 2 Aug 2025 16:09:44 -0700 Subject: [PATCH] Temp logs (#853) --- 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 092ae01fae..b8858832b9 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 8c77293b26..5f67ea0bc8 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: {