( queryClient: QueryClient, organization: string, )
| 26 | }; |
| 27 | |
| 28 | export const createOrganizationRole = ( |
| 29 | queryClient: QueryClient, |
| 30 | organization: string, |
| 31 | ) => { |
| 32 | return { |
| 33 | mutationFn: (request: Role) => |
| 34 | API.createOrganizationRole(organization, request), |
| 35 | onSuccess: async (updatedRole: Role) => |
| 36 | await queryClient.invalidateQueries({ |
| 37 | queryKey: getRoleQueryKey(organization, updatedRole.name), |
| 38 | }), |
| 39 | }; |
| 40 | }; |
| 41 | |
| 42 | export const updateOrganizationRole = ( |
| 43 | queryClient: QueryClient, |
no test coverage detected