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

Method CancelLike

internal/service/interactive.go:56–61  ·  view source on GitHub ↗

CancelLike 处理取消点赞逻辑

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

Source from the content-addressed store, hash-verified

54
55// CancelLike 处理取消点赞逻辑
56func (i *interactiveService) CancelLike(ctx context.Context, postId uint, uid int64) error {
57 if postId == 0 || uid <= 0 {
58 return errors.New("invalid parameters")
59 }
60 return i.repo.DecrLike(ctx, postId, uid)
61}
62
63// Collect 处理收藏逻辑
64func (i *interactiveService) Collect(ctx context.Context, postId uint, uid int64) error {

Callers

nothing calls this directly

Calls 1

DecrLikeMethod · 0.65

Tested by

no test coverage detected