This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
import { getMaintenanceMode } from "@/lib/app-config";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export async function GET() {
|
||||
try {
|
||||
const enabled = await getMaintenanceMode();
|
||||
|
||||
return NextResponse.json(
|
||||
{
|
||||
enabled,
|
||||
},
|
||||
{ status: 200 },
|
||||
);
|
||||
} catch {
|
||||
return NextResponse.json(
|
||||
{
|
||||
enabled: false,
|
||||
},
|
||||
{ status: 200 },
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user