Show emoji votes and my vote in results

This commit is contained in:
2026-02-04 15:17:25 +01:00
parent e6dd64649d
commit 243377ea70
3 changed files with 24 additions and 12 deletions

View File

@@ -34,6 +34,11 @@ public static class ResultsEndpoints
Total = s.Votes.Sum(v => v.Score),
Count = s.Votes.Count,
Average = s.Votes.Count == 0 ? 0 : s.Votes.Average(v => v.Score),
Votes = s.Votes.Select(v => v.Score).ToList(),
MyVote = s.Votes
.Where(v => v.PlayerId == player.Id)
.Select(v => (int?)v.Score)
.FirstOrDefault(),
s.ScreenshotUrl,
s.YoutubeUrl,
s.GameUrl,