🔀 refactor(utils.py): change return type annotation of authenticate_user function from Union[User, None] to Optional[User] for clarity and consistency
This commit is contained in:
parent
408caea750
commit
8c77613f72
1 changed files with 1 additions and 1 deletions
|
|
@ -269,7 +269,7 @@ def create_refresh_token(refresh_token: str, db: Session = Depends(get_session))
|
|||
|
||||
def authenticate_user(
|
||||
username: str, password: str, db: Session = Depends(get_session)
|
||||
) -> User | None:
|
||||
) -> Optional[User]:
|
||||
user = get_user_by_username(db, username)
|
||||
|
||||
if not user:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue