import { NextResponse } from "next/server"; import { requireUser } from "@/lib/auth"; import { checkRuntimeConfig } from "@/lib/config"; export async function GET() { try { const user = await requireUser(); if (user.role !== "admin") return NextResponse.json({ error: "Forbidden" }, { status: 403 }); return NextResponse.json(checkRuntimeConfig()); } catch { return NextResponse.json({ error: "Unauthorized" }, { status: 401 }); } }