Update app.py
Browse files
app.py
CHANGED
@@ -107,7 +107,7 @@ async def login(form_data: OAuth2PasswordRequestForm = Depends(), db: Session =
|
|
107 |
print(recaptcha_result) # or use proper logging
|
108 |
if not recaptcha_result.get('success', False):
|
109 |
raise HTTPException(status_code=400, detail="reCAPTCHA validation failed.")
|
110 |
-
if not
|
111 |
raise HTTPException(status_code=400, detail="Invalid email or password")
|
112 |
|
113 |
user = authenticate_user(db, email=form_data.username, password=form_data.password)
|
|
|
107 |
print(recaptcha_result) # or use proper logging
|
108 |
if not recaptcha_result.get('success', False):
|
109 |
raise HTTPException(status_code=400, detail="reCAPTCHA validation failed.")
|
110 |
+
if not form_data.usernam or not form_data.password:
|
111 |
raise HTTPException(status_code=400, detail="Invalid email or password")
|
112 |
|
113 |
user = authenticate_user(db, email=form_data.username, password=form_data.password)
|