Files
mstfyldz/app/api/admin/check/route.ts
T
2026-08-16 17:18:23 +03:00

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