Feat: list downloading file

This commit is contained in:
HFO4
2020-02-08 15:37:51 +08:00
parent 356ac8d608
commit d30159579f
6 changed files with 95 additions and 1 deletions

View File

@@ -81,3 +81,14 @@ func CancelAria2Download(c *gin.Context) {
c.JSON(200, ErrorResponse(err))
}
}
// ListDownloading 获取正在下载中的任务
func ListDownloading(c *gin.Context) {
var service aria2.DownloadListService
if err := c.ShouldBindQuery(&service); err == nil {
res := service.Downloading(c, CurrentUser(c))
c.JSON(200, res)
} else {
c.JSON(200, ErrorResponse(err))
}
}