diff --git a/app/routers_v2/stratplays.py b/app/routers_v2/stratplays.py index e64f19a..240dad7 100644 --- a/app/routers_v2/stratplays.py +++ b/app/routers_v2/stratplays.py @@ -878,7 +878,7 @@ async def get_pitching_totals( @router.get('/game-summary/{game_id}') async def get_game_summary( - game_id: int, csv: Optional[bool] = False, short_output: Optional[bool] = False, tp_max: Optional[int] = 1): + game_id: int, csv: Optional[bool] = False, short_output: Optional[bool] = False, tp_max: Optional[int] = 1, poop_max: Optional[int] = 1): this_game = StratGame.get_or_none(StratGame.id == game_id) if this_game is None: db.close() @@ -1000,7 +1000,7 @@ async def get_game_summary( 'home': all_errors.where(StratPlay.defender_team == this_game.home_team).count() }, 'top-players': sorted(top_players, key=lambda x: x['re24'], reverse=True)[:tp_max], - 'pooper': sorted(bot_players, key=lambda x: x['re24'])[0], + 'pooper': sorted(bot_players, key=lambda x: x['re24'])[:poop_max], 'pitchers': { 'win': model_to_dict(winner.get().pitcher, recurse=not short_output), 'loss': model_to_dict(loser.get().pitcher, recurse=not short_output),