feat: add first-run admin setup

This commit is contained in:
i vib committed 2026-10-25 06:12:47 -07:00
1 parent dd2fc71867
commit 2aaa9335e3
16 files changed
+644 -152

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
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" } },
);
}
}