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:
parent
21af456c80
commit
401e1bd636
2 changed files with 3 additions and 3 deletions
|
@ -34,10 +34,10 @@ export default function CreateClientRole() {
|
||||||
...role,
|
...role,
|
||||||
});
|
});
|
||||||
|
|
||||||
const createdRole = await adminClient.clients.findRole({
|
const createdRole = (await adminClient.clients.findRole({
|
||||||
id: clientId!,
|
id: clientId!,
|
||||||
roleName: role.name!,
|
roleName: role.name!,
|
||||||
});
|
}))!;
|
||||||
|
|
||||||
addAlert(t("roleCreated"), AlertVariant.success);
|
addAlert(t("roleCreated"), AlertVariant.success);
|
||||||
navigate(
|
navigate(
|
||||||
|
|
|
@ -113,7 +113,7 @@ export class Clients extends Resource<{ realm?: string }> {
|
||||||
|
|
||||||
public findRole = this.makeRequest<
|
public findRole = this.makeRequest<
|
||||||
{ id: string; roleName: string },
|
{ id: string; roleName: string },
|
||||||
RoleRepresentation
|
RoleRepresentation | null
|
||||||
>({
|
>({
|
||||||
method: "GET",
|
method: "GET",
|
||||||
path: "/{id}/roles/{roleName}",
|
path: "/{id}/roles/{roleName}",
|
||||||
|
|
Loading…
Reference in a new issue