We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2ef9e98 commit b927e9eCopy full SHA for b927e9e
src/api/services/kcUsersService.ts
@@ -117,15 +117,16 @@ export const removeApiParticipantMemberRole = async (
117
id: SSP_KK_API_CLIENT_ID,
118
roleName: API_PARTICIPANT_MEMBER_ROLE_NAME,
119
});
120
-
121
- await kcAdminClient.users.delClientRoleMappings({
122
- id: users[0].id!,
123
- clientUniqueId: SSP_KK_API_CLIENT_ID,
124
- roles: [
125
- {
126
- id: apiParticipantMemberRole.id!,
127
- name: apiParticipantMemberRole.name!,
128
- },
129
- ],
130
- });
+ if (apiParticipantMemberRole) {
+ await kcAdminClient.users.delClientRoleMappings({
+ id: users[0].id!,
+ clientUniqueId: SSP_KK_API_CLIENT_ID,
+ roles: [
+ {
+ id: apiParticipantMemberRole.id!,
+ name: apiParticipantMemberRole.name!,
+ },
+ ],
+ });
131
+ }
132
};
0 commit comments