MCPcopy Create free account
hub / github.com/GoSimplicity/LinkMe / ListChecks

Method ListChecks

internal/api/check.go:75–95  ·  view source on GitHub ↗

ListChecks 获取审核列表

(ctx *gin.Context)

Source from the content-addressed store, hash-verified

73
74// ListChecks 获取审核列表
75func (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 获取审核详情
98func (ch *CheckHandler) CheckDetail(ctx *gin.Context) {

Callers

nothing calls this directly

Calls 4

ErrorWithDataFunction · 0.92
SuccessWithDataFunction · 0.92
requireUserFunction · 0.85
ListChecksMethod · 0.65

Tested by

no test coverage detected