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

Function disableNotification

site/src/api/queries/notifications.ts:148–165  ·  view source on GitHub ↗
(
	userId: string,
	queryClient: QueryClient,
)

Source from the content-addressed store, hash-verified

146};
147
148export const disableNotification = (
149 userId: string,
150 queryClient: QueryClient,
151) => {
152 return {
153 mutationFn: async (templateId: string) => {
154 const result = await API.putUserNotificationPreferences(userId, {
155 template_disabled_map: {
156 [templateId]: true,
157 },
158 });
159 return result;
160 },
161 onSuccess: (data) => {
162 queryClient.setQueryData(userNotificationPreferencesKey(userId), data);
163 },
164 } satisfies UseMutationOptions<NotificationPreference[], unknown, string>;
165};

Callers 1

NotificationsPageFunction · 0.90

Tested by

no test coverage detected