diff --git a/app/routers_v2/stratgame.py b/app/routers_v2/stratgame.py index 847f671..04c7c33 100644 --- a/app/routers_v2/stratgame.py +++ b/app/routers_v2/stratgame.py @@ -46,7 +46,8 @@ async def get_games( season: list = Query(default=None), forfeit: Optional[bool] = None, away_team_id: list = Query(default=None), home_team_id: list = Query(default=None), team1_id: list = Query(default=None), team2_id: list = Query(default=None), game_type: list = Query(default=None), ranked: Optional[bool] = None, - short_game: Optional[bool] = None, csv: Optional[bool] = False, short_output: bool = False): + short_game: Optional[bool] = None, csv: Optional[bool] = False, short_output: bool = False, + gauntlet_id: Optional[int] = None): all_games = StratGame.select() if season is not None: @@ -72,6 +73,8 @@ async def get_games( all_games = all_games.where(StratGame.ranked == ranked) if short_game is not None: all_games = all_games.where(StratGame.short_game == short_game) + if gauntlet_id is not None: + all_games = all_games.where(StratGame.game_type.contains(f'gauntlet-{gauntlet_id}')) if csv: return_vals = [model_to_dict(x) for x in all_games]