Merge pull request 'fix: add type annotations to untyped path parameters (#27)' (#43) from ai/paper-dynasty-database#27 into next-release

Reviewed-on: #43
This commit is contained in:
cal 2026-03-05 03:18:49 +00:00
commit 9096a4b976
3 changed files with 4 additions and 4 deletions

View File

@ -109,7 +109,7 @@ async def get_packs(
@router.get('/{pack_id}')
async def get_one_pack(pack_id, csv: Optional[bool] = False):
async def get_one_pack(pack_id: int, csv: Optional[bool] = False):
try:
this_pack = Pack.get_by_id(pack_id)
except Exception:

View File

@ -587,7 +587,7 @@ async def search_players(
@router.get("/{player_id}")
async def get_one_player(player_id, csv: Optional[bool] = False):
async def get_one_player(player_id: int, csv: Optional[bool] = False):
try:
this_player = Player.get_by_id(player_id)
except Exception:
@ -1119,7 +1119,7 @@ async def post_image_reset(
@router.delete("/{player_id}")
async def delete_player(player_id, token: str = Depends(oauth2_scheme)):
async def delete_player(player_id: int, token: str = Depends(oauth2_scheme)):
if not valid_token(token):
logging.warning(f"Bad Token: {token}")
raise HTTPException(

View File

@ -173,7 +173,7 @@ async def get_teams(
@router.get("/{team_id}")
async def get_one_team(team_id, inc_packs: bool = True, csv: Optional[bool] = False):
async def get_one_team(team_id: int, inc_packs: bool = True, csv: Optional[bool] = False):
try:
this_team = Team.get_by_id(team_id)
except Exception: