diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-07-01 18:54:52 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-07-01 18:54:52 +0200 |
| commit | d491f136b40b9bff6ec0ff1e0a4f26cf855a9ffc (patch) | |
| tree | e7fa41adc1a7aeb940095c1151958e74b254034a /wrms.go | |
| parent | a95fc844baf1f96510d59ba77a05755cd24fb777 (diff) | |
| download | WRMS-d491f136b40b9bff6ec0ff1e0a4f26cf855a9ffc.tar.gz WRMS-d491f136b40b9bff6ec0ff1e0a4f26cf855a9ffc.zip | |
add simple wrms test
Diffstat (limited to 'wrms.go')
| -rw-r--r-- | wrms.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -394,7 +394,7 @@ func (wrms *Wrms) AdjustSongWeight(connId uuid.UUID, songUri string, vote string continue } - llog.Info("Adjusting song %s (ptr=%p)", s.Uri, s) + llog.Info("Adjusting song %v (ptr=%p)", s, s) switch vote { case "up": if _, ok := s.Upvotes[connId]; ok { @@ -405,6 +405,7 @@ func (wrms *Wrms) AdjustSongWeight(connId uuid.UUID, songUri string, vote string if _, ok := s.Downvotes[connId]; ok { delete(s.Downvotes, connId) s.Weight += 2 + llog.Debug("Flip downvote") } else { s.Weight += 1 } @@ -419,6 +420,7 @@ func (wrms *Wrms) AdjustSongWeight(connId uuid.UUID, songUri string, vote string if _, ok := s.Upvotes[connId]; ok { delete(s.Upvotes, connId) + llog.Debug("Flip upvote") s.Weight -= 2 } else { s.Weight -= 1 |
