Files

19 lines
539 B
TypeScript
Raw Permalink Normal View History

2026-10-25 06:12:47 -07:00
import { isAdminSetupComplete } from "@/core/auth/adminUsers";
import { NextResponse } from "next/server";
export const runtime = "nodejs";
export const dynamic = "force-dynamic";
export async function GET() {
try {
return NextResponse.json(
{ setupComplete: await isAdminSetupComplete() },
{ headers: { "Cache-Control": "no-store" } },
);
} catch {
return NextResponse.json(
{ error: "Admin setup status is unavailable." },
{ status: 503, headers: { "Cache-Control": "no-store" } },
);
}
}