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") ?? "/");
+2 -2
View File
@@ -28,7 +28,7 @@ const copy = {
};
export default async function RootMaintenancePage() {
const authenticated = isAdminAuthenticated();
const authenticated = await isAdminAuthenticated();
if (!authenticated) {
redirect("/");
@@ -38,7 +38,7 @@ export default async function RootMaintenancePage() {
async function logoutAction() {
"use server";
clearAdminSessionCookie();
await clearAdminSessionCookie();
redirect("/");
}