fix: add created_at and updated_at to AdminUserResponse schema

The admin user detail page was showing empty dates because the API
response schema was missing the created_at and updated_at fields
that exist on the User model via TimestampMixin.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-24 21:44:55 +01:00
parent 9e79a9fd81
commit 6780bd7499

View File

@@ -12,6 +12,7 @@ This module provides endpoints for:
""" """
import logging import logging
from datetime import datetime
from typing import Optional from typing import Optional
from fastapi import APIRouter, Body, Depends, Path, Query from fastapi import APIRouter, Body, Depends, Path, Query
@@ -56,6 +57,8 @@ class AdminUserResponse(BaseModel):
is_active: bool is_active: bool
is_super_admin: bool is_super_admin: bool
platform_assignments: list[PlatformAssignmentResponse] = [] platform_assignments: list[PlatformAssignmentResponse] = []
created_at: datetime
updated_at: datetime
class Config: class Config:
from_attributes = True from_attributes = True