mirror of
https://github.com/aljazceru/landscape-template.git
synced 2025-12-18 23:04:20 +01:00
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