Spaces:
Runtime error
Runtime error
| 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); | |
| } | |
| } | |