Repository navigation
remove_food_entry: delete exercises, notes and biometrics too - #74
Open
paultristanwagner wants to merge 2 commits into
Open
paultristanwagner wants to merge 2 commits into
paultristanwagner wants to merge 2 commits into
Conversation
delete_entries only matched servingId. Exercises (exerciseId), notes (noteId) and biometrics (biometricId) go to the same v3 DELETE, but the endpoint wants notes and biometrics keyed by a plain `id` (with their own key it answers 204 and deletes nothing, or 400) and `meta` as a JSON string. Verified against the live API, matching what the app sends. Claude-Session: https://claude.ai/code/session_01MCJFDo71qoSqTRtcGfkpXJ
This was referenced Oct 16, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #73.
remove_food_entrycan now delete every entry type in the diary:exercises, notes and biometrics as well as foods.
delete_entriesmatched only
servingId, so the other entries couldn't be removed.They all go through the same
DELETE /api/v3/user/{id}/diary-entries,but the v3 endpoint is picky about the shape. Verified against the live API
and matching what the iOS app sends:
get_diaryreturns them, keyed byexerciseIdid. WithnoteIdtheserver answers 400, and with
biometricIdit answers 204 but deletesnothing
metamust be a JSON string ("{}").get_diaryreturns it as anobject, and sending that back gets a 400 "Not able to deserialize data
provided"
Changes:
delete_entriesmatches entries by the id key of their typeand reshapes them for v3 (
_v3_diary_entry). Food servings are sentexactly as before.
remove_food_entry's description lists the entry types andtheir id fields.
https://claude.ai/code/session_01MCJFDo71qoSqTRtcGfkpXJ