()
| 173 | * Updates a scheduled task by scheduler ID. |
| 174 | */ |
| 175 | export function useScheduledTaskUpdate() { |
| 176 | const queryClient = useQueryClient(); |
| 177 | return useMutation({ |
| 178 | mutationFn: ({ |
| 179 | schedulerId, |
| 180 | ...body |
| 181 | }: ScheduledTaskUpdatePayload & { schedulerId: string }) => |
| 182 | apiFetch(`/cronjobs/${schedulerId}`, { |
| 183 | method: "PUT", |
| 184 | body: JSON.stringify(body), |
| 185 | }), |
| 186 | onSuccess: () => { |
| 187 | void queryClient.invalidateQueries({ queryKey: ["scheduled-tasks"] }); |
| 188 | }, |
| 189 | }); |
| 190 | } |
| 191 | |
| 192 | // --- Skills --- |
| 193 |
nothing calls this directly
no test coverage detected