Compare commits
6 Commits
2884c07aeb
...
0953a45b9f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0953a45b9f | ||
| 87f46a1bfd | |||
|
|
8733fd45ad | ||
| 57d8a929fd | |||
| a81bde004b | |||
|
|
3fc6721d4d |
@ -52,9 +52,12 @@ async def update_game_season_stats(
|
||||
raise HTTPException(status_code=401, detail="Unauthorized")
|
||||
|
||||
from ..services.season_stats import update_season_stats
|
||||
from ..db_engine import DoesNotExist
|
||||
|
||||
try:
|
||||
result = update_season_stats(game_id, force=force)
|
||||
except DoesNotExist:
|
||||
raise HTTPException(status_code=404, detail=f"Game {game_id} not found")
|
||||
except Exception as exc:
|
||||
logger.error("update-game/%d failed: %s", game_id, exc, exc_info=True)
|
||||
raise HTTPException(
|
||||
|
||||
@ -1541,10 +1541,11 @@ async def list_team_evolutions(
|
||||
):
|
||||
"""List all EvolutionCardState rows for a team, with optional filters.
|
||||
|
||||
Joins EvolutionCardState to EvolutionTrack so that card_type filtering
|
||||
works without a second query. Results are paginated via page/per_page
|
||||
(1-indexed pages); items are ordered by current_tier DESC, current_value DESC
|
||||
so the most-progressed cards appear first.
|
||||
Joins EvolutionCardState → EvolutionTrack (for card_type filtering and
|
||||
threshold context) and EvolutionCardState → Player (for player_name),
|
||||
both eager-loaded in a single query. Results are paginated via
|
||||
page/per_page (1-indexed pages); items are ordered by current_tier DESC,
|
||||
current_value DESC so the most-progressed cards appear first.
|
||||
|
||||
Query parameters:
|
||||
card_type -- filter to states whose track.card_type matches (e.g. 'batter', 'sp')
|
||||
@ -1555,7 +1556,8 @@ async def list_team_evolutions(
|
||||
Response shape:
|
||||
{"count": N, "items": [card_state_with_threshold_context, ...]}
|
||||
|
||||
Each item in 'items' has the same shape as GET /evolution/cards/{card_id}.
|
||||
Each item in 'items' has the same shape as GET /evolution/cards/{card_id},
|
||||
plus a ``player_name`` field sourced from the Player table.
|
||||
"""
|
||||
if not valid_token(token):
|
||||
logging.warning("Bad Token: [REDACTED]")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user