Typo fixes
This commit is contained in:
parent
1f007c654c
commit
115a50c50a
@ -28,7 +28,7 @@ class DraftListList(pydantic.BaseModel):
|
||||
async def get_draftlist(
|
||||
season: Optional[int], team_id: list = Query(default=None), token: str = Depends(oauth2_scheme)):
|
||||
if not valid_token(token):
|
||||
logging.warning(f'post_draftlist - Bad Token: {token}')
|
||||
logging.warning(f'get_draftlist - Bad Token: {token}')
|
||||
raise HTTPException(status_code=401, detail='Unauthorized')
|
||||
|
||||
all_list = DraftList.select()
|
||||
|
||||
@ -191,7 +191,7 @@ async def patch_team(
|
||||
raise HTTPException(status_code=500, detail=f'Unable to patch team {team_id}')
|
||||
|
||||
|
||||
@router.get('')
|
||||
@router.post('')
|
||||
async def post_team(team_list: TeamList, token: str = Depends(oauth2_scheme)):
|
||||
if not valid_token(token):
|
||||
logging.warning(f'post_team - Bad Token: {token}')
|
||||
|
||||
@ -123,7 +123,7 @@ async def post_transactions(moves: TransactionList, token: str = Depends(oauth2_
|
||||
raise HTTPException(status_code=404, detail=f'Team ID {x.oldteam_id} not found')
|
||||
if Team.get_or_none(Team.id == x.newteam_id) is None:
|
||||
raise HTTPException(status_code=404, detail=f'Team ID {x.newteam_id} not found')
|
||||
if Player.get_or_none(Player.id == x.player_id):
|
||||
if Player.get_or_none(Player.id == x.player_id) is None:
|
||||
raise HTTPException(status_code=404, detail=f'Player ID {x.player_id} not found')
|
||||
|
||||
all_moves.append(x.dict())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user