mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-27 01:51:56 +08:00
Feat: cancel aria2 download task
This commit is contained in:
@@ -70,3 +70,14 @@ func AddAria2Torrent(c *gin.Context) {
|
||||
c.JSON(200, ErrorResponse(err))
|
||||
}
|
||||
}
|
||||
|
||||
// CancelAria2Download 取消aria2离线下载任务
|
||||
func CancelAria2Download(c *gin.Context) {
|
||||
var selectService aria2.DownloadTaskService
|
||||
if err := c.ShouldBindUri(&selectService); err == nil {
|
||||
res := selectService.Delete(c)
|
||||
c.JSON(200, res)
|
||||
} else {
|
||||
c.JSON(200, ErrorResponse(err))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user