mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-13 16:33:18 +00:00
Added user and roles to PublicMember response to fix reactions
This commit is contained in:
committed by
Rory&
parent
a408fdfdf1
commit
25e90df28d
@@ -228,7 +228,15 @@ router.put(
|
||||
const member = (
|
||||
await Member.findOneOrFail({
|
||||
where: { id: req.user_id },
|
||||
select: PublicMemberProjection,
|
||||
relations: { roles: true, user: true },
|
||||
select: {
|
||||
index: true,
|
||||
...Object.fromEntries(PublicMemberProjection.map((x) => [x, true])),
|
||||
user: Object.fromEntries(PublicUserProjection.map((x) => [x, true])),
|
||||
roles: {
|
||||
id: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
).toPublicMember();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user