A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
fix: internal/service: dropped errors
Lars Lehtonend0f3f3e573e1
diff --git a/internal/service/vote_service.go b/internal/service/vote_service.goindex 54fd432c..bccf9c48 100644--- a/internal/service/vote_service.go+++ b/internal/service/vote_service.go@@ -124,6 +124,9 @@ func (vs *VoteService) VoteDown(ctx context.Context, req *schema.VoteReq) (respvoteDownOperationInfo := vs.createVoteOperationInfo(ctx, req.UserID, false, objectInfo)if req.IsCancel {err = vs.voteRepo.CancelVote(ctx, voteDownOperationInfo)+ if err != nil {+ return nil, err+ }} else {// cancel vote up if existerr = vs.voteRepo.CancelVote(ctx, vs.createVoteOperationInfo(ctx, req.UserID, true, objectInfo))@@ -131,6 +134,9 @@ func (vs *VoteService) VoteDown(ctx context.Context, req *schema.VoteReq) (respreturn nil, err}err = vs.voteRepo.Vote(ctx, voteDownOperationInfo)+ if err != nil {+ return nil, err+ }}resp = &schema.VoteResp{}