MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / CancelDownloadTask

Function CancelDownloadTask

routers/controllers/workflow.go:58–68  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

56}
57
58func CancelDownloadTask(c *gin.Context) {
59 taskId := hashid.FromContext(c)
60 err := explorer.CancelDownloadTask(c, taskId)
61 if err != nil {
62 c.JSON(200, serializer.Err(c, err))
63 c.Abort()
64 return
65 }
66
67 c.JSON(200, serializer.Response{})
68}

Callers

nothing calls this directly

Calls 3

FromContextFunction · 0.92
CancelDownloadTaskFunction · 0.92
ErrFunction · 0.92

Tested by

no test coverage detected