Block voting when finalized; disable sliders client-side

This commit is contained in:
2026-02-04 23:17:47 +01:00
parent 56ca3b1f68
commit 4edbfb16ee
2 changed files with 5 additions and 1 deletions

View File

@@ -32,6 +32,8 @@ public static class VoteEndpoints
var player = await EndpointHelpers.GetAuthenticatedPlayer(ctx, db);
if (player is null) return Results.Unauthorized();
if (player.VotesFinal)
return Results.BadRequest(new { error = "Votes are finalized. Unfinalize before changing scores." });
var phase = await EndpointHelpers.GetPhase(db, player.Id);
if (phase != Phase.Vote)
return EndpointHelpers.PhaseMismatch(Phase.Vote, phase);