Added Chat Page

This commit is contained in:
2026-01-21 18:13:35 +01:00
parent 0ca8ce8b52
commit 3eed79ca93
37 changed files with 3966 additions and 64 deletions

16
app/api/auth/me/route.ts Normal file
View File

@@ -0,0 +1,16 @@
import { NextResponse } from 'next/server';
import { getCurrentUser } from '@/lib/auth';
// GET - Récupérer l'utilisateur actuel
export async function GET() {
try {
const user = await getCurrentUser();
if (!user) {
return NextResponse.json({ error: 'Non autorisé' }, { status: 401 });
}
return NextResponse.json(user);
} catch (error) {
console.error('Erreur lors de la récupération de l\'utilisateur:', error);
return NextResponse.json({ error: 'Erreur serveur' }, { status: 500 });
}
}