MCPcopy Index your code
hub / github.com/aptly-dev/aptly / apiTasksReturnValueShow

Function apiTasksReturnValueShow

api/task.go:161–176  ·  view source on GitHub ↗

@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)

Source from the content-addressed store, hash-verified

159// @Failure 404 {object} Error "Not Found"
160// @Router /api/tasks/{id}/return_value [get]
161func 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**

Callers

nothing calls this directly

Calls 4

AbortWithJSONErrorFunction · 0.85
TaskListMethod · 0.80
ByNameMethod · 0.45

Tested by

no test coverage detected