fix: correct token_prefix comment to match implementation (12 chars)

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-08 18:54:55 +00:00
parent a9829598c5
commit 2f95febf71
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -131,7 +131,7 @@ async def create_token(
"""
plaintext = generate_api_token()
token_hash_value = hash_token(plaintext)
prefix = plaintext[:12] # "de_" + first 9 random chars
prefix = plaintext[:12] # "de_" prefix + 9 random chars = 12 chars total
db_token = ApiToken(
owner_id=owner_id,
+1 -1
View File
@@ -627,7 +627,7 @@ class ApiToken(Base):
# SHA-256 hex digest of the full token value
token_hash = Column(String(64), nullable=False, unique=True, index=True)
# First 8 characters of the token for display (e.g. "de_Ab3xY…")
# First 12 characters of the token for display (e.g. "de_Ab3xY7kL…")
token_prefix = Column(String(16), nullable=False)
# Usage tracking