notification + admin panel
This commit is contained in:
12
app/api/admin/check/route.ts
Normal file
12
app/api/admin/check/route.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { NextRequest, NextResponse } from 'next/server'
|
||||
import { isAdminAuthenticated } from '@/lib/admin-auth'
|
||||
|
||||
export async function GET(request: NextRequest) {
|
||||
try {
|
||||
const authenticated = await isAdminAuthenticated()
|
||||
return NextResponse.json({ authenticated })
|
||||
} catch (error) {
|
||||
return NextResponse.json({ authenticated: false })
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user