Refactor phase reads to pure lookups and align admin docs

This commit is contained in:
2026-02-07 00:36:04 +01:00
parent fcd44de4e4
commit 81c04e0866
12 changed files with 124 additions and 42 deletions

View File

@@ -23,7 +23,7 @@ public static class ResultsEndpoints
var appState = await db.AppState.AsNoTracking().FirstAsync();
if (!appState.ResultsOpen)
return Results.BadRequest(new { error = "Results are locked until the admin enables them." });
var phase = await EndpointHelpers.GetPhase(db, player.Id);
var phase = await EndpointHelpers.GetCurrentPhaseAsync(db, player.Id);
if (phase != Phase.Results)
return EndpointHelpers.PhaseMismatch(Phase.Results, phase);
@@ -96,3 +96,4 @@ public static class ResultsEndpoints
);
}
}