MCPcopy Create free account
hub / github.com/coder/coder / setChatGroupRole

Function setChatGroupRole

site/src/api/queries/chats.ts:2065–2076  ·  view source on GitHub ↗
(queryClient: QueryClient)

Source from the content-addressed store, hash-verified

2063});
2064
2065export const setChatGroupRole = (queryClient: QueryClient) => ({
2066 mutationFn: ({ chatId, groupId, role }: SetChatGroupRoleVariables) =>
2067 API.experimental.updateChatACL(chatId, {
2068 group_roles: { [groupId]: role },
2069 }),
2070 onSuccess: async (_data: unknown, { chatId }: SetChatGroupRoleVariables) => {
2071 await queryClient.invalidateQueries({
2072 queryKey: chatACLKey(chatId),
2073 exact: true,
2074 });
2075 },
2076});

Callers 2

chats.test.tsFile · 0.90

Calls 1

chatACLKeyFunction · 0.85

Tested by

no test coverage detected