Update code in endpoints/login.post.py
This commit is contained in:
parent
f2578b90f1
commit
e260d0baa6
@ -13,6 +13,7 @@ async def login(
|
|||||||
db: Session = Depends(get_db)
|
db: Session = Depends(get_db)
|
||||||
):
|
):
|
||||||
user = authenticate_user(db, user_credentials.email, user_credentials.password)
|
user = authenticate_user(db, user_credentials.email, user_credentials.password)
|
||||||
|
|
||||||
if not user:
|
if not user:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=status.HTTP_401_UNAUTHORIZED,
|
status_code=status.HTTP_401_UNAUTHORIZED,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user