From e260d0baa642bef80e21c53158ce9d20c0b3ff22 Mon Sep 17 00:00:00 2001 From: Backend IM Bot Date: Fri, 28 Mar 2025 18:43:37 +0000 Subject: [PATCH] Update code in endpoints/login.post.py --- endpoints/login.post.py | 1 + 1 file changed, 1 insertion(+) diff --git a/endpoints/login.post.py b/endpoints/login.post.py index eb4045e..5c77efa 100644 --- a/endpoints/login.post.py +++ b/endpoints/login.post.py @@ -13,6 +13,7 @@ async def login( db: Session = Depends(get_db) ): user = authenticate_user(db, user_credentials.email, user_credentials.password) + if not user: raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED,