修复退出登录路径

This commit is contained in:
2026-04-17 13:04:17 +08:00
parent d3b03cecf2
commit dee056a76a
2 changed files with 9 additions and 3 deletions
+5 -2
View File
@@ -2,10 +2,13 @@ import { NextResponse } from "next/server";
import { clearCurrentCaregiverSession } from "@/lib/session";
export async function POST(request: Request) {
export async function POST() {
await clearCurrentCaregiverSession();
return NextResponse.redirect(new URL("/login", request.url), {
return new NextResponse(null, {
status: 303,
headers: {
Location: "/login",
},
});
}