Files
2026-08-04 07:42:41 -04:00

5 lines
172 B
Python

def serialize(doc: dict) -> dict:
doc["id"] = str(doc.pop("_id"))
doc.pop("user_id", None) # internal ownership field, not part of the API response
return doc