This commit is contained in:
2026-03-31 10:23:49 +05:30
parent f488400c6d
commit cfecfa5116
8 changed files with 21 additions and 23 deletions

View File

@@ -38,6 +38,7 @@ class UserUpdate(BaseModel):
displayName: Optional[str] = None
photoURL: Optional[str] = None
theme: Optional[str] = None
tutorial: Optional[bool] = None
class Config:
json_schema_extra = {
@@ -56,6 +57,7 @@ class User(BaseModel):
createdAt: datetime
updatedAt: datetime
theme: str = "light"
tutorial: Optional[bool] = None
class Config:
from_attributes = True

View File

@@ -79,6 +79,7 @@ async def get_user_by_email(email: str):
"displayName": user.get("displayName"),
"photoURL": user.get("photoURL"),
"theme": user.get("theme", "light"),
"tutorial": user.get("tutorial"),
"createdAt": user["createdAt"].isoformat(),
"updatedAt": user["updatedAt"].isoformat()
}
@@ -151,6 +152,7 @@ async def update_user(user_id: str, user_data: UserUpdate):
"displayName": user.get("displayName"),
"photoURL": user.get("photoURL"),
"theme": user.get("theme", "light"),
"tutorial": user.get("tutorial"),
"createdAt": user["createdAt"].isoformat(),
"updatedAt": user["updatedAt"].isoformat(),
"message": "User updated successfully"