From 711c78d762503732318556bdaf52d55cdf17d2bf Mon Sep 17 00:00:00 2001 From: Frank Tovar Date: Tue, 3 Feb 2026 02:06:51 +0100 Subject: [PATCH] Include player counts in results payload --- Endpoints/ResultsEndpoints.cs | 2 ++ wwwroot/js/ui.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Endpoints/ResultsEndpoints.cs b/Endpoints/ResultsEndpoints.cs index 017409e..af2d301 100644 --- a/Endpoints/ResultsEndpoints.cs +++ b/Endpoints/ResultsEndpoints.cs @@ -25,6 +25,8 @@ public static class ResultsEndpoints s.Id, s.Name, Author = s.Player!.DisplayName, + s.MinPlayers, + s.MaxPlayers, Total = s.Votes.Sum(v => v.Score), Count = s.Votes.Count, Average = s.Votes.Count == 0 ? 0 : s.Votes.Average(v => v.Score), diff --git a/wwwroot/js/ui.js b/wwwroot/js/ui.js index 4c67a0c..263a855 100644 --- a/wwwroot/js/ui.js +++ b/wwwroot/js/ui.js @@ -263,7 +263,7 @@ function buildResultMeta(r) { const hasPlayers = r.minPlayers || r.maxPlayers; const players = hasPlayers ? t("card.players", { min: r.minPlayers ?? "?", max: r.maxPlayers ?? "?" }) - : null; + : "wtf"; const bits = [r.genre, players].filter(Boolean); if (bits.length === 0) return ""; return `
${bits.join(" • ")}
`;