fix(auth): allow registration without display name
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 2087h6m23s
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Deploy Production (push) Failing after 2087h4m10s

This commit is contained in:
Xiaoxia AI
2026-06-21 16:24:21 +08:00
parent a1bc6eba90
commit a7f816fe5b
3 changed files with 22 additions and 2 deletions
+4 -2
View File
@@ -5,6 +5,8 @@ The route layer is intentionally thin: repository construction lives in
app.dependencies and authentication behavior lives in application use cases.
"""
from typing import Optional
from app.auth import AuthenticatedUser, get_current_user
from app.config import settings
from app.dependencies import get_auth_email_service, get_auth_session_store, get_user_repository
@@ -32,7 +34,7 @@ class RegisterRequest(BaseModel):
email: EmailStr
password: str
username: str
display_name: str
display_name: Optional[str] = None
class RegisterResponse(BaseModel):
@@ -99,7 +101,7 @@ async def register(
email=request.email,
password=request.password,
username=request.username,
display_name=request.display_name,
display_name=request.display_name or request.username,
)
)
if error or response is None: