@Summary List Tasks @Description **Get list of available tasks. Each task is returned as in “show” API** @Tags Tasks @Produce json @Success 200 {array} task.Task @Router /api/tasks [get]
(c *gin.Context)
| 14 | // @Success 200 {array} task.Task |
| 15 | // @Router /api/tasks [get] |
| 16 | func apiTasksList(c *gin.Context) { |
| 17 | list := context.TaskList() |
| 18 | c.JSON(200, list.GetTasks()) |
| 19 | } |
| 20 | |
| 21 | // @Summary Clear Tasks |
| 22 | // @Description **Removes finished and failed tasks from internal task list** |