mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-13 22:32:04 +00:00
feat(dashboard): send the glucose card in the owner's glucose unit
/api/dashboard/summary sent the glucose card's value in mg/dL with unit null and a unitKey that reads mg/dL, so a reader on mmol/L saw the mg/dL number. The card now carries latestValue, secondaryValue and sparkline in the record owner's glucose unit and names it in unit, the field that wins over unitKey, as the sleep card already does. Applied after the summary cache read, so a unit change shows on the next request.
This commit is contained in:
1 parent
cfddf097c7
commit
9455b64375
6 files changed
+126
-4
No files matched your search
@@ -71078,8 +71078,10 @@ components:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: "null"
|
||||
description: Explicit unit token, set only on the `sleep` card (`h`, because its value is a per-night total in hours
|
||||
rather than the canonical SLEEP_DURATION minutes). Null on every other kind.
|
||||
description: "Explicit unit token. When set it wins over `unitKey`. Set on the `sleep` card (`h`, because its value is a
|
||||
per-night total in hours rather than the canonical SLEEP_DURATION minutes) and, since v1.40.0, on the
|
||||
`glucose` card: the record owner's glucose unit (`mg/dL` or `mmol/L`), with `latestValue`, `secondaryValue`
|
||||
and `sparkline` converted to it (mmol/L to one decimal). Null on every other kind."
|
||||
sleepStages:
|
||||
anyOf:
|
||||
- type: object
|
||||
|
||||
Reference in new issue
Block a user