fix: add last_login to AdminUserResponse schema and builder
The last_login field was missing from the API response, causing it to always show empty on the admin user detail page. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -59,6 +59,7 @@ class AdminUserResponse(BaseModel):
|
||||
platform_assignments: list[PlatformAssignmentResponse] = []
|
||||
created_at: datetime
|
||||
updated_at: datetime
|
||||
last_login: Optional[datetime] = None
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
@@ -126,6 +127,7 @@ def _build_admin_response(admin: User) -> AdminUserResponse:
|
||||
platform_assignments=assignments,
|
||||
created_at=admin.created_at,
|
||||
updated_at=admin.updated_at,
|
||||
last_login=admin.last_login,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user