Spaces:
Sleeping
Sleeping
Added datetime lambda function in config
Browse files- app/models/chat_logs.py +5 -1
app/models/chat_logs.py
CHANGED
|
@@ -15,7 +15,11 @@ class ChatLog(BaseModel):
|
|
| 15 |
|
| 16 |
class Config:
|
| 17 |
populate_by_name = True
|
| 18 |
-
json_encoders = {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
class StarUpdate(BaseModel):
|
| 21 |
id: str
|
|
|
|
| 15 |
|
| 16 |
class Config:
|
| 17 |
populate_by_name = True
|
| 18 |
+
json_encoders = {
|
| 19 |
+
ObjectId: str,
|
| 20 |
+
datetime: lambda v: v.replace(microsecond=0).isoformat() + "Z" # "2025-10-22T21:22:27Z"
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
|
| 24 |
class StarUpdate(BaseModel):
|
| 25 |
id: str
|