feat: improve admin experience and ignore local data

This commit is contained in:
2026-04-14 19:12:20 +08:00
parent 6378ab4994
commit 2e3eb4b8f8
10 changed files with 1132 additions and 119 deletions
+5 -2
View File
@@ -2,7 +2,10 @@ import { NextResponse } from "next/server";
import { destroyAdminSession, destroyUserSession } from "@/lib/session";
export async function POST(request: Request) {
export async function POST() {
await Promise.all([destroyAdminSession(), destroyUserSession()]);
return NextResponse.redirect(new URL("/login", request.url));
const response = new NextResponse(null, { status: 303 });
response.headers.set("Location", "/login");
return response;
}