Files
cbd420/app/api/admin/check/route.ts
2025-12-21 11:39:41 +01:00

13 lines
356 B
TypeScript

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 })
}
}