From b9f7f23962a87332d91df7d8b0646bd6a8578e9e Mon Sep 17 00:00:00 2001 From: Backend IM Bot Date: Fri, 28 Mar 2025 18:54:24 +0000 Subject: [PATCH] Update code in endpoints/login.post.py --- endpoints/login.post.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/endpoints/login.post.py b/endpoints/login.post.py index 5c77efa..f84f936 100644 --- a/endpoints/login.post.py +++ b/endpoints/login.post.py @@ -13,7 +13,6 @@ 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, @@ -22,9 +21,4 @@ async def login( ) access_token = create_access_token(data={"sub": user.email}) - - return { - "access_token": access_token, - "token_type": "bearer", - "user": user - } \ No newline at end of file + return {"access_token": access_token, "token_type": "bearer", "user": user} \ No newline at end of file