mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-15 23:12:04 +00:00
fix(meds): grace-row save lands on the primary schedule
The detail page settings section PUTs reminderGraceMinutes at the top level, but the schema only accepted it per-schedule, returning 422 on every save. The route now maps a top-level grace value onto the primary schedule's reminderGraceMinutes before the Prisma update; the schema declares the top-level field with a description noting the normalisation. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
8c740fd146
commit
8adf1b55e8
4 files changed
+158
No files matched your search
@@ -1999,6 +1999,14 @@ components:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/MedicationScheduleInput"
|
||||
reminderGraceMinutes:
|
||||
description: "Detail-page bridge: primary-schedule reminder-window in minutes. The route maps the value onto the primary
|
||||
schedule's `reminderGraceMinutes` field; ignored when a full `schedules` array is also supplied."
|
||||
anyOf:
|
||||
- type: integer
|
||||
minimum: 0
|
||||
maximum: 1440
|
||||
- type: "null"
|
||||
description: Update-medication body. Every field is optional; omitted fields are left untouched. Supplying `schedules`
|
||||
REPLACES the medication's full schedule list (the route deletes existing rows before re-creating). Flipping
|
||||
`active` to false records the current timestamp on `pausedAt`; flipping back to true clears it. v1.5 invariants
|
||||
|
||||
Reference in new issue
Block a user