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

Method FollowUser

internal/repository/relation.go:37–45  ·  view source on GitHub ↗

FollowUser 关注用户

(ctx context.Context, followerID, followeeID int64)

Source from the content-addressed store, hash-verified

35
36// FollowUser 关注用户
37func (r *relationRepository) FollowUser(ctx context.Context, followerID, followeeID int64) error {
38 // 关注成功后清除相关缓存
39 if err := r.dao.FollowUser(ctx, followerID, followeeID); err != nil {
40 return err
41 }
42 r.cache.ClearFollowCache(ctx, followerID, followeeID)
43
44 return nil
45}
46
47func (r *relationRepository) CancelFollowUser(ctx context.Context, followerID, followeeID int64) error {
48 // 取消关注后清除相关缓存

Callers

nothing calls this directly

Calls 2

FollowUserMethod · 0.65
ClearFollowCacheMethod · 0.65

Tested by

no test coverage detected