This commit is contained in:
2025-12-04 15:49:57 +01:00
parent c698a0b893
commit 60a3c82cd9
26 changed files with 399 additions and 98 deletions

View File

@@ -0,0 +1,11 @@
import { NextResponse } from 'next/server';
import { getAuthService } from '@/lib/auth';
export async function POST(request: Request) {
const authService = getAuthService();
await authService.logout();
const url = new URL(request.url);
const redirectUrl = new URL('/', url.origin);
return NextResponse.redirect(redirectUrl);
}

View File

@@ -0,0 +1,11 @@
import { NextResponse } from 'next/server';
import { getAuthService } from '@/lib/auth';
export async function GET() {
const authService = getAuthService();
const session = await authService.getCurrentSession();
return NextResponse.json({
session,
});
}