diff --git a/back/utils.py b/back/utils.py index 5533fc7..9a7bcce 100644 --- a/back/utils.py +++ b/back/utils.py @@ -32,7 +32,7 @@ def get_password_hash(password): # проблема здесь -def get_user(db: SessionLocal, email: str): +def get_user(db: Session, email: str): user_with_required_email = db.query(UserDatabase).filter(UserDatabase.email == email).one() if user_with_required_email: return user_with_required_email @@ -59,7 +59,7 @@ def create_access_token(data: dict, expires_delta: Union[timedelta, None] = None return encoded_jwt -async def get_current_user(db: SessionLocal, token: Annotated[str, Depends(oauth2_scheme)]): +async def get_current_user(db: Session, token: Annotated[str, Depends(oauth2_scheme)]): credentials_exception = HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Could not validate credentials",