import { NextResponse } from "next/server";
import { prisma } from "../../../../lib/prisma";

export const dynamic = "force-dynamic";

export async function GET() {
  const setting = await prisma.setting.findUnique({
    where: { key: "registration_enabled" }
  });
  const registrationEnabled = setting?.value !== "false";
  return NextResponse.json({ registrationEnabled });
}
