Upgrade app to Next.js 16
CI / quality (push) Waiting to run

This commit is contained in:
MOH
2026-03-13 15:50:37 +01:00
parent f14116b56c
commit e32ac4cacb
40 changed files with 1853 additions and 1157 deletions
+4 -4
View File
@@ -9,15 +9,15 @@ import { clearAdminSessionCookie, isAdminAuthenticated } from "@/lib/admin-auth"
import { getLocalizedPath } from "@/lib/locale";
import { setMaintenanceMode } from "@/lib/app-config";
function ensureAdmin() {
if (!isAdminAuthenticated()) {
clearAdminSessionCookie();
async function ensureAdmin() {
if (!(await isAdminAuthenticated())) {
await clearAdminSessionCookie();
redirect("/");
}
}
export async function updateMaintenanceModeAction(formData: FormData) {
ensureAdmin();
await ensureAdmin();
const nextValue = formData.get("enabled") === "true";
const redirectPath = String(formData.get("redirectPath") ?? "/");