enhance: ユーザーにロールが期限付きでアサインされている場合、その期限をユーザーのモデレーションページで確認できるように
Close #11059
This commit is contained in:
parent
2ddf575cdc
commit
871027fa0c
6 changed files with 51 additions and 11 deletions
|
@ -61,6 +61,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||
|
||||
const signins = await this.signinsRepository.findBy({ userId: user.id });
|
||||
|
||||
const roleAssigns = await this.roleService.getUserAssigns(user.id);
|
||||
const roles = await this.roleService.getUserRoles(user.id);
|
||||
|
||||
return {
|
||||
|
@ -85,6 +86,11 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||
signins,
|
||||
policies: await this.roleService.getUserPolicies(user.id),
|
||||
roles: await this.roleEntityService.packMany(roles, me),
|
||||
roleAssigns: roleAssigns.map(a => ({
|
||||
createdAt: a.createdAt.toISOString(),
|
||||
expiresAt: a.expiresAt ? a.expiresAt.toISOString() : null,
|
||||
roleId: a.roleId,
|
||||
})),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue