@Summary Get Task Return Value @Description **Return task return value (status code) by given ID** @Tags Tasks @Produce plain @Param id path int true "Task ID" @Success 200 {object} string "msg" @Failure 500 {object} Error "invalid syntax, bad ID?" @Failure 404 {object} Error "Not Found" @Router /ap
(c *gin.Context)
| 159 | // @Failure 404 {object} Error "Not Found" |
| 160 | // @Router /api/tasks/{id}/return_value [get] |
| 161 | func apiTasksReturnValueShow(c *gin.Context) { |
| 162 | list := context.TaskList() |
| 163 | id, err := strconv.ParseInt(c.Params.ByName("id"), 10, 0) |
| 164 | if err != nil { |
| 165 | AbortWithJSONError(c, 500, err) |
| 166 | return |
| 167 | } |
| 168 | |
| 169 | output, err := list.GetTaskReturnValueByID(int(id)) |
| 170 | if err != nil { |
| 171 | AbortWithJSONError(c, 404, err) |
| 172 | return |
| 173 | } |
| 174 | |
| 175 | c.JSON(200, output) |
| 176 | } |
| 177 | |
| 178 | // @Summary Delete Task |
| 179 | // @Description **Delete completed task by given ID. Does not stop task execution** |
nothing calls this directly
no test coverage detected