Feat: list tasks

This commit is contained in:
HFO4
2020-02-18 14:45:38 +08:00
parent b4219927d6
commit f91792bc64
7 changed files with 71 additions and 3 deletions

View File

@@ -145,5 +145,15 @@ func UserAvailablePolicies(c *gin.Context) {
} else {
c.JSON(200, ErrorResponse(err))
}
}
// UserTasks 获取任务队列
func UserTasks(c *gin.Context) {
var service user.SettingListService
if err := c.ShouldBindQuery(&service); err == nil {
res := service.ListTasks(c, CurrentUser(c))
c.JSON(200, res)
} else {
c.JSON(200, ErrorResponse(err))
}
}