Skip reveal phase and freeze titles after suggestions

This commit is contained in:
2026-02-04 22:06:43 +01:00
parent 0f6a0fb35a
commit 90bcde6f36
8 changed files with 13 additions and 44 deletions

View File

@@ -49,7 +49,6 @@ public static class StateEndpoints
return Results.BadRequest(new { error = "Results are locked until the admin enables them." });
}
// Non-admins can only move forward
player.CurrentPhase = next;
await db.SaveChangesAsync();
return Results.Ok(new { player.CurrentPhase, appState.ResultsOpen });
@@ -90,8 +89,8 @@ public static class StateEndpoints
private static Phase NextPhase(Phase current) => current switch
{
Phase.Suggest => Phase.Reveal,
Phase.Reveal => Phase.Vote,
Phase.Suggest => Phase.Vote,
Phase.Reveal => Phase.Vote, // legacy safety
Phase.Vote => Phase.Results,
_ => Phase.Results
};
@@ -99,8 +98,8 @@ public static class StateEndpoints
private static Phase PrevPhase(Phase current) => current switch
{
Phase.Results => Phase.Vote,
Phase.Vote => Phase.Reveal,
Phase.Reveal => Phase.Suggest,
Phase.Vote => Phase.Suggest,
Phase.Reveal => Phase.Suggest, // legacy safety
_ => Phase.Suggest
};
}