diff --git a/pkg/internal/services/posts.go b/pkg/internal/services/posts.go index 15c2643..76c11d3 100644 --- a/pkg/internal/services/posts.go +++ b/pkg/internal/services/posts.go @@ -520,7 +520,7 @@ func ReactPost(user authm.Account, reaction models.Reaction) (bool, models.React if reaction.Attitude == models.AttitudePositive { op.TotalUpvote++ - database.C.Model(&op).Update("total_upvote", op.TotalDownvote) + database.C.Model(&op).Update("total_upvote", op.TotalUpvote) } else { op.TotalDownvote++ database.C.Model(&op).Update("total_downvote", op.TotalDownvote) @@ -538,7 +538,7 @@ func ReactPost(user authm.Account, reaction models.Reaction) (bool, models.React if reaction.Attitude == models.AttitudePositive { op.TotalUpvote-- - database.C.Model(&op).Update("total_upvote", op.TotalDownvote) + database.C.Model(&op).Update("total_upvote", op.TotalUpvote) } else { op.TotalDownvote-- database.C.Model(&op).Update("total_downvote", op.TotalDownvote)