From 7b8cb339a73d83e7a55d4ef3b60e16b24a42317a Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 30 Jun 2023 16:56:24 +0200 Subject: fix condition in AdjustSongWeight --- wrms.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wrms.go b/wrms.go index 29110a9..cac60db 100644 --- a/wrms.go +++ b/wrms.go @@ -414,9 +414,8 @@ func (wrms *Wrms) AdjustSongWeight(connId uuid.UUID, songUri string, vote string if _, ok := s.Downvotes[connId]; ok { delete(s.Downvotes, connId) s.Weight += 1 - } - if _, ok := s.Upvotes[connId]; ok { + } else if _, ok := s.Upvotes[connId]; ok { delete(s.Upvotes, connId) s.Weight -= 1 } else { -- cgit v1.2.3