Temp logs (#853)

This commit is contained in:
Siddharth Ganesan
2025-08-02 16:09:44 -07:00
committed by GitHub
parent 38e1747130
commit e8b05ae420
2 changed files with 2 additions and 19 deletions
-17
View File
@@ -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 })
}
+2 -2
View File
@@ -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: {