MCPcopy Index your code
hub / github.com/coder/coder / createOrganizationRole

Function createOrganizationRole

site/src/api/queries/roles.ts:28–40  ·  view source on GitHub ↗
(
	queryClient: QueryClient,
	organization: string,
)

Source from the content-addressed store, hash-verified

26};
27
28export 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
42export const updateOrganizationRole = (
43 queryClient: QueryClient,

Callers 1

CreateEditRolePageFunction · 0.90

Calls 2

getRoleQueryKeyFunction · 0.85

Tested by

no test coverage detected