11 lines
305 B
TypeScript
11 lines
305 B
TypeScript
import { NextResponse } from "next/server";
|
|
import { isAdminAuthenticated, ADMIN_USERNAME } from "@/lib/auth";
|
|
|
|
export async function GET() {
|
|
const authenticated = await isAdminAuthenticated();
|
|
return NextResponse.json({
|
|
authenticated,
|
|
username: authenticated ? ADMIN_USERNAME : null,
|
|
});
|
|
}
|