fixes
This commit is contained in:
Binary file not shown.
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user