From 19700ff67fbb34ac57916c01ab03a931a2923e78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Gierwia=C5=82o?= Date: Sun, 7 Dec 2025 19:33:31 +0100 Subject: [PATCH] fix(api): add nested user object to match messages response --- backend/src/routes/matches.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/backend/src/routes/matches.js b/backend/src/routes/matches.js index 7f1f60c..5765331 100644 --- a/backend/src/routes/matches.js +++ b/backend/src/routes/matches.js @@ -529,10 +529,13 @@ router.get('/:slug/messages', authenticate, async (req, res, next) => { id: msg.id, roomId: msg.roomId, userId: msg.user.id, - username: msg.user.username, - avatar: msg.user.avatar, - firstName: msg.user.firstName, - lastName: msg.user.lastName, + user: { + id: msg.user.id, + username: msg.user.username, + avatar: msg.user.avatar, + firstName: msg.user.firstName, + lastName: msg.user.lastName, + }, content: msg.content, type: msg.type, createdAt: msg.createdAt,