update user

This commit is contained in:
2023-10-25 23:42:34 +02:00
parent c120e60911
commit 94bdf0e27a
4 changed files with 23 additions and 8 deletions

View File

@@ -35,6 +35,9 @@ def authenticate_user(username: str, password: str):
return False
if not verify_password(password, user.password):
return False
user.connected_at = datetime.today()
user_repository = users.UserRepository(database=database.database)
user_repository.save(user)
return user
def create_access_token(data: dict, expires_delta: timedelta | None = None):