fix(api): add Content-Type header to POST/PATCH requests (#18)

↗ view on GitHub · EduardoCarone · 2026-07-12 · ade0a0dd

* ci(deploy): fix VPC_SUBNETS to comma-separated for run-task

AWS CLI run-task expects comma-separated subnet IDs in
awsvpcConfiguration, not space-separated.

* fix(api): add Content-Type: application/json to all POST/PATCH requests

The apiRequest function was not setting Content-Type header.
Express.json() middleware only parses body when Content-Type is
application/json, so POST /admin/users received an empty body,
causing 'Valid email is required' even for valid emails.

This affected all POST/PATCH admin endpoints (create user, change
role, disable, enable, reset password, revoke sessions).

---------

Co-authored-by: Januário <januario@Januarios-Mac-mini.local>
Repository Edu-Carone-SA/mike
Author EduardoCarone <educarone@gmail.com>
Authored
Parents 159228d3
Stats 1 file changed , +1
Part of MIKE-05: admin-only user management

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-ade0a0dd.md from inside the repo you want the change in.

⬇ Download capture-commit-ade0a0dd.md