Fix: aria2 RPC retry / return NoT_FOUND error while listing not existed path

This commit is contained in:
HFO4
2020-02-10 10:33:39 +08:00
parent 7a6c84a115
commit f235ad1def
11 changed files with 125 additions and 16 deletions

View File

@@ -92,3 +92,14 @@ func ListDownloading(c *gin.Context) {
c.JSON(200, ErrorResponse(err))
}
}
// ListFinished 获取已完成的任务
func ListFinished(c *gin.Context) {
var service aria2.DownloadListService
if err := c.ShouldBindQuery(&service); err == nil {
res := service.Finished(c, CurrentUser(c))
c.JSON(200, res)
} else {
c.JSON(200, ErrorResponse(err))
}
}