Switch to version 1: remove src/app/api/auth/logout/route.ts

This commit is contained in:
2026-03-09 19:57:04 +00:00
parent ec5a2fabbe
commit 12596b2d1d

View File

@@ -1,24 +0,0 @@
import { NextRequest, NextResponse } from "next/server";
export async function POST(request: NextRequest) {
try {
// Clear authentication token on client side via response
const response = NextResponse.json(
{ message: "Logged out successfully" },
{ status: 200 }
);
// Set cookie to expire if using cookies for auth
response.cookies.set({
name: "authToken", value: "", maxAge: 0,
path: "/"});
return response;
} catch (error) {
console.error("Logout error:", error);
return NextResponse.json(
{ message: "Internal server error" },
{ status: 500 }
);
}
}