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

Method CancelCollect

internal/service/interactive.go:83–88  ·  view source on GitHub ↗

CancelCollect 处理取消收藏逻辑

(ctx context.Context, postId uint, uid int64)

Source from the content-addressed store, hash-verified

81
82// CancelCollect 处理取消收藏逻辑
83func (i *interactiveService) CancelCollect(ctx context.Context, postId uint, uid int64) error {
84 if postId == 0 || uid <= 0 {
85 return errors.New("invalid parameters")
86 }
87 return i.repo.DecrCollectionItem(ctx, postId, uid)
88}
89
90// Get 获取单个互动信息
91func (i *interactiveService) Get(ctx context.Context, postId uint) (domain.Interactive, error) {

Callers

nothing calls this directly

Calls 1

DecrCollectionItemMethod · 0.65

Tested by

no test coverage detected