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

Method ApproveCheck

internal/api/check.go:31–50  ·  view source on GitHub ↗

ApproveCheck 审核通过

(ctx *gin.Context)

Source from the content-addressed store, hash-verified

29
30// ApproveCheck 审核通过
31func (ch *CheckHandler) ApproveCheck(ctx *gin.Context) {
32 var req req.ApproveCheckReq
33 if err := ctx.ShouldBindJSON(&req); err != nil {
34 apiresponse.ErrorWithData(ctx, err)
35 return
36 }
37
38 uc, ok := requireUser(ctx)
39 if !ok {
40 return
41 }
42
43 err := ch.svc.ApproveCheck(ctx, req.CheckID, req.Remark, uc.Uid)
44 if err != nil {
45 apiresponse.ErrorWithData(ctx, err)
46 return
47 }
48
49 apiresponse.Success(ctx)
50}
51
52// RejectCheck 审核拒绝
53func (ch *CheckHandler) RejectCheck(ctx *gin.Context) {

Callers

nothing calls this directly

Calls 4

ErrorWithDataFunction · 0.92
SuccessFunction · 0.92
requireUserFunction · 0.85
ApproveCheckMethod · 0.65

Tested by

no test coverage detected