Yarik commited on
Commit
9a18fdd
1 Parent(s): a6f4e74

Add application file

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -70,7 +70,7 @@ def authenticate(fake_db, api_key: str, password: str):
70
 
71
  @app.post("/token")
72
  async def login(form_data: OAuth2PasswordRequestForm = Depends()):
73
- api_data = authenticate(fake_data_db, form_data.api_key, form_data.password)
74
  if not api_data:
75
  raise HTTPException(
76
  status_code=400,
 
70
 
71
  @app.post("/token")
72
  async def login(form_data: OAuth2PasswordRequestForm = Depends()):
73
+ api_data = authenticate(fake_data_db, form_data.username, form_data.password)
74
  if not api_data:
75
  raise HTTPException(
76
  status_code=400,