mirror of
https://github.com/johndoe6345789/postgres.git
synced 2026-04-24 22:04:58 +00:00
16 lines
378 B
TypeScript
16 lines
378 B
TypeScript
import { NextResponse } from 'next/server';
|
|
import { clearSession } from '@/utils/session';
|
|
|
|
export async function POST() {
|
|
try {
|
|
await clearSession();
|
|
return NextResponse.json({ success: true });
|
|
} catch (error) {
|
|
console.error('Logout error:', error);
|
|
return NextResponse.json(
|
|
{ error: 'Internal server error' },
|
|
{ status: 500 },
|
|
);
|
|
}
|
|
}
|