Skip to content

Commit

Permalink
update user remove role endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ipula committed Nov 5, 2024
1 parent f6a05ec commit ee31c27
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/pages/userInvitation/UserInvitationUserGroupsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,15 @@ function updateWithSelectedUserGroups(userGroups) {
});
}
/** Update invitation */
/**
* remove user roles
* @param userId Number
* @param roleId Number
*/
async function removeRole(userId, roleId) {
const {apiUrl} = useUrl(`users/${userId}/role/${roleId}`);
const {apiUrl} = useUrl(`users/${userId}/endRole/${roleId}`);
const {fetch} = useFetch(apiUrl, {
method: 'DELETE',
method: 'PUT',
});
await fetch();
}
Expand Down

0 comments on commit ee31c27

Please sign in to comment.