11 lines
283 B
TypeScript
11 lines
283 B
TypeScript
import { NextResponse } from "next/server"
|
|
import { logout } from "@/lib/auth"
|
|
|
|
export async function POST() {
|
|
try {
|
|
await logout()
|
|
return NextResponse.json({ success: true })
|
|
} catch {
|
|
return NextResponse.json({ error: "Der opstod en fejl" }, { status: 500 })
|
|
}
|
|
}
|