CancelCollect 处理取消收藏逻辑
(ctx context.Context, postId uint, uid int64)
| 81 | |
| 82 | // CancelCollect 处理取消收藏逻辑 |
| 83 | func (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 获取单个互动信息 |
| 91 | func (i *interactiveService) Get(ctx context.Context, postId uint) (domain.Interactive, error) { |
nothing calls this directly
no test coverage detected