(key: string, taskId: string)
| 127 | } |
| 128 | |
| 129 | export function cancelTask(key: string, taskId: string) { |
| 130 | return fetchJson<{ cancelled: boolean }>(`/tasks/${encodeURIComponent(taskId)}/cancel`, key, { |
| 131 | method: "POST", |
| 132 | body: "{}", |
| 133 | }); |
| 134 | } |
| 135 | |
| 136 | export function getTask(key: string, taskId: string, options: RequestOptions = {}) { |
| 137 | return fetchJson<TaskResponse>(`/tasks/${encodeURIComponent(taskId)}`, key, { |