( queryClient: QueryClient, organization: string, )
| 40 | }; |
| 41 | |
| 42 | export const updateOrganizationRole = ( |
| 43 | queryClient: QueryClient, |
| 44 | organization: string, |
| 45 | ) => { |
| 46 | return { |
| 47 | mutationFn: (request: Role) => |
| 48 | API.updateOrganizationRole(organization, request), |
| 49 | onSuccess: async (updatedRole: Role) => |
| 50 | await queryClient.invalidateQueries({ |
| 51 | queryKey: getRoleQueryKey(organization, updatedRole.name), |
| 52 | }), |
| 53 | }; |
| 54 | }; |
| 55 | |
| 56 | export const deleteOrganizationRole = ( |
| 57 | queryClient: QueryClient, |
no test coverage detected