proiect finalizat
This commit is contained in:
@@ -4,6 +4,15 @@ from database.queries.user import get_user_by_email
|
||||
|
||||
|
||||
async def login(login_info: Login):
|
||||
"""
|
||||
Verify user credentials
|
||||
|
||||
Args:
|
||||
login_info (Login)
|
||||
|
||||
Returns:
|
||||
dict : full user information besides password
|
||||
"""
|
||||
result = get_user_by_email(login_info.email)
|
||||
if not result:
|
||||
raise HTTPException(status_code=404, detail='User not in system.')
|
||||
|
||||
Reference in New Issue
Block a user