(c *gin.Context)
| 66 | } |
| 67 | |
| 68 | func ListSystemTasks(c *gin.Context) { |
| 69 | limit, _ := strconv.Atoi(c.Query("limit")) |
| 70 | |
| 71 | tasks, err := model.ListSystemTasks(limit) |
| 72 | if err != nil { |
| 73 | common.ApiError(c, err) |
| 74 | return |
| 75 | } |
| 76 | |
| 77 | responses := make([]model.SystemTaskResponse, 0, len(tasks)) |
| 78 | for _, task := range tasks { |
| 79 | responses = append(responses, task.ToResponse()) |
| 80 | } |
| 81 | |
| 82 | c.JSON(http.StatusOK, gin.H{ |
| 83 | "success": true, |
| 84 | "message": "", |
| 85 | "data": responses, |
| 86 | }) |
| 87 | } |
| 88 | |
| 89 | func GetSystemTask(c *gin.Context) { |
| 90 | taskID := c.Param("task_id") |
nothing calls this directly
no test coverage detected