プロフィールにロールを表示するように

This commit is contained in:
syuilo 2023-01-13 12:07:24 +09:00
parent d43a4a2d46
commit 4c21d83639
2 changed files with 28 additions and 0 deletions

View file

@ -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 ? {