@Summary Get Task Details @Description **Return task detail for a given ID** @Tags Tasks @Produce json @Param id path int true "Task ID" @Success 200 {object} string "Task detail" @Failure 500 {object} Error "invalid syntax, bad ID?" @Failure 404 {object} Error "Task Not Found" @Router /api/tasks/{i
(c *gin.Context)
| 132 | // @Failure 404 {object} Error "Task Not Found" |
| 133 | // @Router /api/tasks/{id}/detail [get] |
| 134 | func apiTasksDetailShow(c *gin.Context) { |
| 135 | list := context.TaskList() |
| 136 | id, err := strconv.ParseInt(c.Params.ByName("id"), 10, 0) |
| 137 | if err != nil { |
| 138 | AbortWithJSONError(c, 500, err) |
| 139 | return |
| 140 | } |
| 141 | |
| 142 | var detail interface{} |
| 143 | detail, err = list.GetTaskDetailByID(int(id)) |
| 144 | if err != nil { |
| 145 | AbortWithJSONError(c, 404, err) |
| 146 | return |
| 147 | } |
| 148 | |
| 149 | c.JSON(200, detail) |
| 150 | } |
| 151 | |
| 152 | // @Summary Get Task Return Value |
| 153 | // @Description **Return task return value (status code) by given ID** |
nothing calls this directly
no test coverage detected