tractatus/src
TheFlow fdbf5994fe fix(middleware): critical Date serialization bug in response sanitization
Problem: All MongoDB Date objects were being serialized as empty {} in API
responses, breaking blog date display across entire site.

Root Cause: removeSensitiveFields() function used spread operator on Date
objects ({...date}), which creates empty object because Dates have no
enumerable properties.

Fix: Added Date instance check before spreading to preserve Date objects
intact for proper JSON.stringify() serialization.

Impact:
- Fixes all blog dates showing 'Invalid Date'
- API now returns proper ISO date strings
- Deployed to production and verified working

Ref: SESSION_HANDOFF_2025-10-23_WEBSITE_AUDIT.md
2025-10-23 10:55:38 +13:00
..
config refactor: remove project-specific code and fix broken imports (Phase 7) 2025-10-21 22:06:43 +13:00
controllers refactor: deep cleanup - remove all website code from framework repo 2025-10-21 21:22:40 +13:00
middleware fix(middleware): critical Date serialization bug in response sanitization 2025-10-23 10:55:38 +13:00
models refactor: remove website code and fix critical startup crashes (Phase 8) 2025-10-21 22:17:02 +13:00
routes refactor: remove project-specific code and fix broken imports (Phase 7) 2025-10-21 22:06:43 +13:00
services refactor: deep cleanup - remove all website code from framework repo 2025-10-21 21:22:40 +13:00
utils refactor: remove project-specific code and fix broken imports (Phase 7) 2025-10-21 22:06:43 +13:00
server.js refactor: remove website code and fix critical startup crashes (Phase 8) 2025-10-21 22:17:02 +13:00