diff --git a/Endpoints/VoteEndpoints.cs b/Endpoints/VoteEndpoints.cs index 6ae1f34..c1a9b5d 100644 --- a/Endpoints/VoteEndpoints.cs +++ b/Endpoints/VoteEndpoints.cs @@ -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); diff --git a/wwwroot/js/ui.js b/wwwroot/js/ui.js index 4c5ce1d..83ee8dc 100644 --- a/wwwroot/js/ui.js +++ b/wwwroot/js/ui.js @@ -152,7 +152,7 @@ export function renderVotes() { footer.innerHTML = `