This commit is contained in:
@@ -4,11 +4,11 @@ import prisma from '../../../../lib/prisma'
|
||||
// GET /api/conversations/[id] — Get messages for a conversation
|
||||
export async function GET(
|
||||
request: NextRequest,
|
||||
{ params }: { params: Promise<{ id: string }> }
|
||||
) {
|
||||
context: { params: Promise<{ id: string }> }
|
||||
): Promise<Response> {
|
||||
try {
|
||||
const userId = request.headers.get('x-user-id')
|
||||
const { id } = await params
|
||||
const { id } = await context.params
|
||||
|
||||
if (!userId) {
|
||||
return NextResponse.json({ error: 'Utilisateur non identifié' }, { status: 401 })
|
||||
@@ -36,6 +36,7 @@ export async function GET(
|
||||
select: {
|
||||
id: true,
|
||||
name: true,
|
||||
email: true,
|
||||
avatar: true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user