Skip to content

Commit e8b05ae

Browse files
authored
Temp logs (#853)
1 parent 38e1747 commit e8b05ae

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

apps/sim/app/api/copilot/chat/route.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -123,23 +123,6 @@ export async function POST(req: NextRequest) {
123123
const session = await getSession()
124124
let authenticatedUserId: string | null = session?.user?.id || null
125125

126-
// If no session, check for API key auth
127-
if (!authenticatedUserId) {
128-
const apiKeyHeader = req.headers.get('x-api-key')
129-
if (apiKeyHeader) {
130-
// Verify API key
131-
const [apiKeyRecord] = await db
132-
.select({ userId: apiKeyTable.userId })
133-
.from(apiKeyTable)
134-
.where(eq(apiKeyTable.key, apiKeyHeader))
135-
.limit(1)
136-
137-
if (apiKeyRecord) {
138-
authenticatedUserId = apiKeyRecord.userId
139-
}
140-
}
141-
}
142-
143126
if (!authenticatedUserId) {
144127
return NextResponse.json({ error: 'Unauthorized' }, { status: 401 })
145128
}

apps/sim/lib/logs/console/logger.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ const LOG_CONFIG = {
4444
colorize: true,
4545
},
4646
production: {
47-
enabled: false, // Disable all console logs in production
48-
minLevel: LogLevel.ERROR,
47+
enabled: true, // Enable console logs in production
48+
minLevel: LogLevel.INFO, // Show INFO, WARN, and ERROR logs
4949
colorize: false,
5050
},
5151
test: {

0 commit comments

Comments
 (0)