feat: sync deployed v1.0.0-rc.38-custom.42
Sync production source including routing, billing, Astra detection and public uptime. Update custom build instructions and license packaging.
This commit is contained in:
1 parent
aa6c3f50f4
commit
ceddfd3d6b
828 files changed
+122253
-13702
No files matched your search
@@ -66,9 +66,17 @@ func GetCurrentSystemTask(c *gin.Context) {
|
||||
}
|
||||
|
||||
func ListSystemTasks(c *gin.Context) {
|
||||
limit, _ := strconv.Atoi(c.Query("limit"))
|
||||
var query struct {
|
||||
model.SystemTaskFilter
|
||||
Offset int `form:"offset" binding:"gte=0"`
|
||||
Limit int `form:"limit"`
|
||||
}
|
||||
if err := c.ShouldBindQuery(&query); err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"success": false, "message": "invalid system task filters"})
|
||||
return
|
||||
}
|
||||
|
||||
tasks, err := model.ListSystemTasks(limit)
|
||||
tasks, total, err := model.ListSystemTasks(query.SystemTaskFilter, query.Offset, query.Limit)
|
||||
if err != nil {
|
||||
common.ApiError(c, err)
|
||||
return
|
||||
@@ -83,6 +91,25 @@ func ListSystemTasks(c *gin.Context) {
|
||||
"success": true,
|
||||
"message": "",
|
||||
"data": responses,
|
||||
"total": total,
|
||||
})
|
||||
}
|
||||
|
||||
func DeleteSystemTaskHistory(c *gin.Context) {
|
||||
var filter model.SystemTaskFilter
|
||||
if err := c.ShouldBindQuery(&filter); err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"success": false, "message": "invalid system task filters"})
|
||||
return
|
||||
}
|
||||
deleted, err := model.DeleteSystemTaskHistory(filter)
|
||||
if err != nil {
|
||||
common.ApiError(c, err)
|
||||
return
|
||||
}
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"success": true,
|
||||
"message": "",
|
||||
"data": gin.H{"deleted_count": deleted},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user