(c *gin.Context)
| 12 | ) |
| 13 | |
| 14 | func CreateLogCleanupSystemTask(c *gin.Context) { |
| 15 | targetTimestamp, _ := strconv.ParseInt(c.Query("target_timestamp"), 10, 64) |
| 16 | if targetTimestamp == 0 { |
| 17 | c.JSON(http.StatusOK, gin.H{ |
| 18 | "success": false, |
| 19 | "message": "target timestamp is required", |
| 20 | }) |
| 21 | return |
| 22 | } |
| 23 | |
| 24 | task, err := service.StartLogCleanupTask(targetTimestamp) |
| 25 | if err != nil { |
| 26 | common.ApiError(c, err) |
| 27 | return |
| 28 | } |
| 29 | |
| 30 | c.JSON(http.StatusOK, gin.H{ |
| 31 | "success": true, |
| 32 | "message": "", |
| 33 | "data": task.ToResponse(), |
| 34 | }) |
| 35 | } |
| 36 | |
| 37 | func GetCurrentSystemTask(c *gin.Context) { |
| 38 | taskType := c.Query("type") |
nothing calls this directly
no test coverage detected