complete loading single items
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s

This commit is contained in:
Thomas Peetz
2026-05-21 13:43:53 +02:00
parent 6269b54ee8
commit 40b498ed2a
40 changed files with 467 additions and 235 deletions
+25 -1
View File
@@ -1,3 +1,5 @@
from datetime import datetime
from pydantic import BaseModel
from src.db.models.admin import Profile
@@ -5,8 +7,30 @@ from src.db.models.admin import Profile
class ProfileResponse(BaseModel):
id: str
username: str
created_date: datetime
last_modified_date: datetime
version: int
first_name: str
last_name: str
user_name: str
email: str
password: str
enabled: bool
def to_response(profile: Profile) -> ProfileResponse:
response: ProfileResponse = ProfileResponse(
id=profile.id,
created_date=profile.created_date,
last_modified_date=profile.last_modified_date,
version=profile.version,
first_name=profile.first_name,
last_name=profile.last_name,
user_name=profile.user_name,
email=profile.email,
password=profile.password,
enabled=profile.enabled
)
return response
class ProfileModel(BaseModel):
username: str