mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-12 14:16:12 +00:00
fix(mood): report the tag and factor keys a mood write did not store
An unknown or archived tag key, or a factor the catalog no longer carries, was dropped on the way in while the entry still reported "inserted" (bulk) or 201 (create, edit). A client had no way to tell that part of what it sent never landed. Each write now names those keys: the bulk result per entry, the create and edit responses on the entry, as droppedTagKeys and droppedFactorKeys. Both are present only when non-empty, so a response where everything landed is unchanged. An archived tag an edit preserved is on the entry and is not listed. The web shows a short notice after saving when a picked tag was left off.
This commit is contained in:
1 parent
fdbbd3a84a
commit
a66976874e
22 files changed
+525
-50
No files matched your search
@@ -60081,6 +60081,19 @@ components:
|
||||
externalId:
|
||||
description: Echoed back when the entry carried one, for client mapping.
|
||||
type: string
|
||||
droppedTagKeys:
|
||||
description: "`tagKeys` from this request that were not stored: unknown to the catalog, archived, another account's
|
||||
custom tag, or a rated factor sent as a binary key. Present only when non-empty; absent means every
|
||||
submitted key landed. The entry itself was written."
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
droppedFactorKeys:
|
||||
description: "`ratedFactors` keys from this request that were not stored: unknown, archived, or not a rated factor.
|
||||
Present only when non-empty; absent means every submitted factor landed."
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
required:
|
||||
- index
|
||||
- status
|
||||
@@ -60722,6 +60735,19 @@ components:
|
||||
- $ref: "#/components/schemas/MoodContextOutput"
|
||||
- type: "null"
|
||||
description: The day's context, or null when the entry carries none. Null and an object of nulls are different answers.
|
||||
droppedTagKeys:
|
||||
description: "Create and edit responses only: `tagKeys` from the request that are not on the entry (unknown, archived,
|
||||
another account's custom tag, or a rated factor sent as a binary key). Present only when non-empty. An
|
||||
archived tag the edit preserved is on the entry and is not listed."
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
droppedFactorKeys:
|
||||
description: "Create and edit responses only: `ratedFactors` keys from the request that are not on the entry. Present
|
||||
only when non-empty."
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
required:
|
||||
- id
|
||||
- userId
|
||||
|
||||
Reference in new issue
Block a user