プロフィールにロールを表示するように
This commit is contained in:
parent
d43a4a2d46
commit
4c21d83639
2 changed files with 28 additions and 0 deletions
|
@ -448,6 +448,14 @@ export class UserEntityService implements OnModuleInit {
|
|||
userId: user.id,
|
||||
}).then(result => result >= 1)
|
||||
: false,
|
||||
roles: this.roleService.getUserRoles(user.id).then(roles => roles.filter(role => role.isPublic).map(role => ({
|
||||
id: role.id,
|
||||
name: role.name,
|
||||
color: role.color,
|
||||
description: role.description,
|
||||
isModerator: role.isModerator,
|
||||
isAdministrator: role.isAdministrator,
|
||||
}))),
|
||||
} : {}),
|
||||
|
||||
...(opts.detail && isMe ? {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue