fix(entities): entity profile save (missing JSON content-type)

↗ view on GitHub · emileriksenkeev · 2026-07-14 · 102af35f

updateEntityProfile was the only mutating apiRequest call not setting
Content-Type: application/json, so express.json() skipped the body, the handler
saw entity_profile=undefined and rejected it, and EntityOverview.save() (no catch)
silently reverted - the save never worked.

- apiRequest now defaults Content-Type: application/json for string bodies
  (FormData left alone), fixing this and preventing the whole class of bug.
- EntityOverview.save() now surfaces errors instead of silently reverting.
- PATCH /entity-profile tolerates an empty/unparsed body.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Repository emileriksenkeev/sydOS
Author emileriksenkeev <emil@keev.co>
Authored
Parents 96f028be
Stats 3 files changed , +47 , -21
Part of Entities - org-wide entity spaces (corporate roster & profiles)

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-102af35f.md from inside the repo you want the change in.

⬇ Download capture-commit-102af35f.md