11 lines
338 B
TypeScript
11 lines
338 B
TypeScript
import { NextResponse } from "next/server";
|
|
import { prisma } from "../../../../lib/prisma";
|
|
|
|
export async function GET() {
|
|
const setting = await prisma.setting.findUnique({
|
|
where: { key: "registration_enabled" }
|
|
});
|
|
const registrationEnabled = setting?.value !== "false";
|
|
return NextResponse.json({ registrationEnabled });
|
|
}
|