Fix return type of clients.findRole() in @keycloak/keycloak-admin-client (#27429)

Closes #27444

Signed-off-by: Simon Hanna <simon.hanna@aeb.com>
This commit is contained in:
Simon Hanna 2024-03-12 16:01:54 +01:00 committed by GitHub
parent 21af456c80
commit 401e1bd636
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -34,10 +34,10 @@ export default function CreateClientRole() {
...role,
});
const createdRole = await adminClient.clients.findRole({
const createdRole = (await adminClient.clients.findRole({
id: clientId!,
roleName: role.name!,
});
}))!;
addAlert(t("roleCreated"), AlertVariant.success);
navigate(

View file

@ -113,7 +113,7 @@ export class Clients extends Resource<{ realm?: string }> {
public findRole = this.makeRequest<
{ id: string; roleName: string },
RoleRepresentation
RoleRepresentation | null
>({
method: "GET",
path: "/{id}/roles/{roleName}",