Fixed showing realm roles (#3337)

This commit is contained in:
Erik Jan de Wit 2022-09-19 11:56:18 +02:00 committed by GitHub
parent 6300f13aa0
commit 49ffd816ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,14 +42,14 @@ export const Role = () => {
values.map((r) => adminClient.roles.findOneById({ id: r.id })) values.map((r) => adminClient.roles.findOneById({ id: r.id }))
); );
return Promise.all( return Promise.all(
roles roles.map(async (role) => ({
.filter((r) => r?.clientRole) role: role!,
.map(async (role) => ({ client: role!.clientRole
role: role!, ? await adminClient.clients.findOne({
client: await adminClient.clients.findOne({ id: role?.containerId!,
id: role?.containerId!, })
}), : undefined,
})) }))
); );
} }
return Promise.resolve([]); return Promise.resolve([]);