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

Function apiTasksOutputShow

api/task.go:107–123  ·  view source on GitHub ↗

@Summary Get Task Output @Description **Return task output for a given ID** @Tags Tasks @Produce plain @Param id path int true "Task ID" @Success 200 {object} string "Task output" @Failure 500 {object} Error "invalid syntax, bad ID?" @Failure 404 {object} Error "Task Not Found" @Router /api/tasks/{i

(c *gin.Context)

Source from the content-addressed store, hash-verified

105// @Failure 404 {object} Error "Task Not Found"
106// @Router /api/tasks/{id}/output [get]
107func apiTasksOutputShow(c *gin.Context) {
108 list := context.TaskList()
109 id, err := strconv.ParseInt(c.Params.ByName("id"), 10, 0)
110 if err != nil {
111 AbortWithJSONError(c, 500, err)
112 return
113 }
114
115 var output string
116 output, err = list.GetTaskOutputByID(int(id))
117 if err != nil {
118 AbortWithJSONError(c, 404, err)
119 return
120 }
121
122 c.JSON(200, output)
123}
124
125// @Summary Get Task Details
126// @Description **Return task detail for a given ID**

Callers

nothing calls this directly

Calls 4

AbortWithJSONErrorFunction · 0.85
TaskListMethod · 0.80
GetTaskOutputByIDMethod · 0.80
ByNameMethod · 0.45

Tested by

no test coverage detected