File tree Expand file tree Collapse file tree 2 files changed +2
-19
lines changed
Expand file tree Collapse file tree 2 files changed +2
-19
lines changed Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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 : {
You can’t perform that action at this time.
0 commit comments