Refactor ProfileDropdown to fetch user details, simplify logout flow, and enhance dropdown UI; add /api/me route for user data retrieval.

This commit is contained in:
2025-06-14 09:46:25 +02:00
parent af9c562c41
commit 3fc0cf1207
2 changed files with 25 additions and 20 deletions

View File

@@ -0,0 +1,8 @@
import {NextRequest, NextResponse} from 'next/server'
export function GET(req: NextRequest) {
const user = req.headers.get('x-user') ?? ''
const email = req.headers.get('x-email') ?? ''
return NextResponse.json({user, email})
}