feat: improve admin experience and ignore local data
This commit is contained in:
+5
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user