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

Method CancelFollowUser

internal/api/relation.go:92–111  ·  view source on GitHub ↗
(ctx *gin.Context, req req.CancelFollowUserReq)

Source from the content-addressed store, hash-verified

90}
91
92func (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 获取关注者的数量
114func (r *RelationHandler) GetFolloweeCount(ctx *gin.Context, req req.GetFolloweeCountReq) (Result, error) {

Callers

nothing calls this directly

Calls 2

requireUserFunction · 0.85
CancelFollowUserMethod · 0.65

Tested by

no test coverage detected