Files
cgm-remote-monitor/tests
Ben WestandCopilot ef7bff3d53 fix(food): add array support to food API POST
Add array normalization to food API POST endpoint:
- API layer: normalize single object to array (like activity/profile)
- Storage layer: use replaceOne loop with upsert (same as activity pattern)
- Storage layer: accept both single object and array for backward compat

Previously POST /api/food/ with array input would crash:
  insertOne([{...}]) → MongoDB error

Now supports both single object and array input consistently.
Response format is now array (matching treatments pattern).

Fixes #8447

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-18 14:06:16 -07:00
..
2021-02-18 18:23:40 +02:00
2022-08-30 12:49:01 +03:00
2021-02-08 19:28:49 +02:00
2019-11-10 21:57:49 +00:00
2020-12-14 22:30:21 +02:00
2020-02-22 17:07:21 +02:00