Skip to content

Commit

Permalink
Merge branch 'feat/account-deletion' into deploy/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
GareArc committed Dec 27, 2024
2 parents 058ba1d + 0169c6d commit b8cdc20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/services/account_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from events.tenant_event import tenant_was_created
from extensions.ext_database import db
from extensions.ext_redis import redis_client
from libs.helper import RateLimiter, TokenManager, generate_string
from libs.helper import RateLimiter, TokenManager
from libs.passport import PassportService
from libs.password import compare_password, hash_password, valid_password
from libs.rsa import generate_key_pair
Expand Down Expand Up @@ -257,7 +257,7 @@ def create_account_and_tenant(

@staticmethod
def generate_account_deletion_verification_code(account: Account) -> tuple[str, str]:
code = generate_string(6)
code = "".join([str(random.randint(0, 9)) for _ in range(6)])
token = TokenManager.generate_token(
account=account, token_type="account_deletion", additional_data={"code": code}
)
Expand Down

0 comments on commit b8cdc20

Please sign in to comment.