mirror of
https://github.com/aljazceru/landscape-template.git
synced 2026-01-19 22:34:33 +01:00
Merge pull request #161 from Dolu89/fix/avatar_comment
fix: displaying avatar in story comments
This commit is contained in:
@@ -23,12 +23,19 @@ const getEventsExtraData = async (req, res) => {
|
||||
select: {
|
||||
id: true,
|
||||
avatar: true,
|
||||
avatar_rel: {
|
||||
select: {
|
||||
url: true,
|
||||
}
|
||||
},
|
||||
name: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
comments.map(c => c.user.avatar = c.user.avatar_rel?.url ?? c.user.avatar)
|
||||
|
||||
return res
|
||||
.status(200)
|
||||
.json(comments)
|
||||
|
||||
Reference in New Issue
Block a user