enhance: exploreで公開ロール一覧とそのメンバーを閲覧できるように

This commit is contained in:
syuilo 2023-02-22 14:43:18 +09:00
parent 69869307bf
commit 870f7608be
20 changed files with 405 additions and 46 deletions

View file

@ -39,12 +39,12 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
private roleEntityService: RoleEntityService,
) {
super(meta, paramDef, async (ps) => {
super(meta, paramDef, async (ps, me) => {
const role = await this.rolesRepository.findOneBy({ id: ps.roleId });
if (role == null) {
throw new ApiError(meta.errors.noSuchRole);
}
return await this.roleEntityService.pack(role);
return await this.roleEntityService.pack(role, me);
});
}
}