vip11017 commited on
Commit
e199ec6
·
1 Parent(s): 9bdf7ef

Added datetime lambda function in config

Browse files
Files changed (1) hide show
  1. 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 = {ObjectId: str}
 
 
 
 
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