COURTRIX / src /app /api /auth /logout /route.ts
Ali-Developments's picture
Upload 125 files
ad79323 verified
Raw
History Blame Contribute Delete
363 Bytes
import { NextResponse } from "next/server";
import { destroyCurrentSession } from "@/server/auth/session";
import { createRouteErrorResponse } from "@/server/errors";
export async function POST() {
try {
await destroyCurrentSession();
return NextResponse.json({ success: true });
} catch (error) {
return createRouteErrorResponse(error);
}
}