fix(api): add nested user object to match messages response
This commit is contained in:
@@ -529,10 +529,13 @@ router.get('/:slug/messages', authenticate, async (req, res, next) => {
|
||||
id: msg.id,
|
||||
roomId: msg.roomId,
|
||||
userId: msg.user.id,
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user