ListChecks 获取审核列表
(ctx *gin.Context)
| 73 | |
| 74 | // ListChecks 获取审核列表 |
| 75 | func (ch *CheckHandler) ListChecks(ctx *gin.Context) { |
| 76 | var req req.ListCheckReq |
| 77 | if err := ctx.ShouldBindQuery(&req); err != nil { |
| 78 | apiresponse.ErrorWithData(ctx, err) |
| 79 | return |
| 80 | } |
| 81 | if _, ok := requireUser(ctx); !ok { |
| 82 | return |
| 83 | } |
| 84 | |
| 85 | checks, err := ch.svc.ListChecks(ctx, domain.Pagination{ |
| 86 | Page: req.Page, |
| 87 | Size: req.Size, |
| 88 | }) |
| 89 | if err != nil { |
| 90 | apiresponse.ErrorWithData(ctx, err) |
| 91 | return |
| 92 | } |
| 93 | |
| 94 | apiresponse.SuccessWithData(ctx, checks) |
| 95 | } |
| 96 | |
| 97 | // CheckDetail 获取审核详情 |
| 98 | func (ch *CheckHandler) CheckDetail(ctx *gin.Context) { |
nothing calls this directly
no test coverage detected