13 lines
356 B
TypeScript
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 })
|
|
}
|
|
}
|
|
|