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
+5 -5
View File
@@ -2,7 +2,7 @@
import { revalidatePath } from "next/cache";
import { redirect } from "next/navigation";
import { isRedirectError } from "next/dist/client/components/redirect";
import { isRedirectError } from "next/dist/client/components/redirect-error";
import { toInternalAdminPath } from "@/lib/admin-routing";
import { clearAdminSessionCookie, isAdminAuthenticated } from "@/lib/admin-auth";
@@ -10,9 +10,9 @@ import { updateMarqueeSettings } from "@/lib/app-config";
import { routing } from "@/i18n/routing";
import { getLocalizedPath } from "@/lib/locale";
function ensureAdmin() {
if (!isAdminAuthenticated()) {
clearAdminSessionCookie();
async function ensureAdmin() {
if (!(await isAdminAuthenticated())) {
await clearAdminSessionCookie();
redirect("/");
}
}
@@ -35,7 +35,7 @@ async function revalidateMarqueePages() {
}
export async function saveMarqueeSettingsAction(formData: FormData) {
ensureAdmin();
await ensureAdmin();
try {
const germanSettings = {