(taskId: number)
| 515 | } |
| 516 | |
| 517 | async deleteTask(taskId: number): Promise<OkResponse> { |
| 518 | /** |
| 519 | * Deletes a specific task. |
| 520 | * |
| 521 | * @param taskId The ID of the task to delete. |
| 522 | * @return A success message. |
| 523 | */ |
| 524 | const url = this._makeApiUrl(`tasks/${taskId}`); |
| 525 | try { |
| 526 | const response = await axios.delete(url); |
| 527 | |
| 528 | this._writeJson("delete_task", response.data); |
| 529 | return response.data; |
| 530 | } catch (error) { |
| 531 | if (axios.isAxiosError(error)) { |
| 532 | raiseIfBadException(error.response as AxiosResponse); |
| 533 | } |
| 534 | throw error; |
| 535 | } |
| 536 | } |
| 537 | |
| 538 | async deleteTasks({ taskIds }: { taskIds: number[] }): Promise<OkResponse> { |
| 539 | /** |
nothing calls this directly
no test coverage detected