Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Nov 15, 2023
1 parent 2967da9 commit a5a544e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ async def authentication(
if r.status_code == 200:
token = await create_token(form_data.username)
user: schemas.UserBase = {"user_id": form_data.username, "token": token} # type: ignore
crud.create_user(db, user=user) # type: ignore
crud.create_user(db, user=user)
return {"access_token": token, "token_type": "bearer"}
elif r.status_code == 403:
await asyncio.sleep(2) # prevents brute-force
Expand Down Expand Up @@ -140,7 +140,7 @@ async def create_price(
current_user: schemas.UserBase = Depends(get_current_user),
db: Session = Depends(get_db),
):
db_price = crud.create_price(db, price=price, user=current_user) # type: ignore
db_price = crud.create_price(db, price=price, user=current_user)
return db_price


Expand Down

0 comments on commit a5a544e

Please sign in to comment.