(ctx *gin.Context, req req.CancelFollowUserReq)
| 90 | } |
| 91 | |
| 92 | func (r *RelationHandler) CancelFollowUser(ctx *gin.Context, req req.CancelFollowUserReq) (Result, error) { |
| 93 | uc, ok := requireUser(ctx) |
| 94 | if !ok { |
| 95 | return Result{ |
| 96 | Code: CancelFollowUserERRORCode, |
| 97 | Msg: "未登录或登录已过期", |
| 98 | }, nil |
| 99 | } |
| 100 | |
| 101 | if err := r.svc.CancelFollowUser(ctx, uc.Uid, req.FolloweeID); err != nil { |
| 102 | return Result{ |
| 103 | Code: CancelFollowUserERRORCode, |
| 104 | Msg: CancelFollowUserERRORMsg, |
| 105 | }, err |
| 106 | } |
| 107 | return Result{ |
| 108 | Code: RequestsOK, |
| 109 | Msg: CancelFollowUserSuccessMsg, |
| 110 | }, nil |
| 111 | } |
| 112 | |
| 113 | // GetFolloweeCount 获取关注者的数量 |
| 114 | func (r *RelationHandler) GetFolloweeCount(ctx *gin.Context, req req.GetFolloweeCountReq) (Result, error) { |
nothing calls this directly
no test coverage detected