* The task list handlers below deliberately do not call projectTaskArtifacts. Artifact projection is confined to the explicit endpoints above. */
(c *gin.Context)
| 415 | */ |
| 416 | |
| 417 | func GetAllTask(c *gin.Context) { |
| 418 | pageInfo := common.GetPageQuery(c) |
| 419 | startTimestamp, _ := strconv.ParseInt(c.Query("start_timestamp"), 10, 64) |
| 420 | endTimestamp, _ := strconv.ParseInt(c.Query("end_timestamp"), 10, 64) |
| 421 | queryParams := model.SyncTaskQueryParams{Platform: constant.TaskPlatform(c.Query("platform")), TaskID: c.Query("task_id"), Status: c.Query("status"), Action: c.Query("action"), StartTimestamp: startTimestamp, EndTimestamp: endTimestamp, ChannelID: c.Query("channel_id")} |
| 422 | items := model.TaskGetAllTasks(pageInfo.GetStartIdx(), pageInfo.GetPageSize(), queryParams) |
| 423 | pageInfo.SetTotal(int(model.TaskCountAllTasks(queryParams))) |
| 424 | pageInfo.SetItems(tasksToDto(items, true, c.GetInt("role"))) |
| 425 | common.ApiSuccess(c, pageInfo) |
| 426 | } |
| 427 | |
| 428 | func GetUserTask(c *gin.Context) { |
| 429 | pageInfo := common.GetPageQuery(c) |
nothing calls this directly
no test coverage detected