Fix broken dashboard meal logs and recipe browsing - #1
Closed
cursor[bot] wants to merge 3 commits into
Closed
Conversation
Co-authored-by: Vasanth Panuganti <vpanuga2@asu.edu>
Co-authored-by: Vasanth Panuganti <vpanuga2@asu.edu>
Co-authored-by: Vasanth Panuganti <vpanuga2@asu.edu>
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.
Summary
/recipes/search.Bug and impact
{ items, nextCursor, hasMore }as aMealLog[], causing a runtime crash when meal logs loaded; it also sent strippedstartDate/endDateparams, so totals could be calculated from the wrong logs./api/v1/recipesand/api/v1/recipes/search, but those routes were missing, so recipe browsing/search returned 404/422 instead of user-facing recipe results.Root cause
/recipes/searchcould fall through to the UUID detail route.Fix and validation
pnpm --filter @snacktrack/backend test(49 tests passed).pnpm --filter @snacktrack/frontend test(14 tests passed).DATABASE_URL=postgresql://localhost:5432/snacktrack_test DIRECT_URL=postgresql://localhost:5432/snacktrack_test pnpm --filter @snacktrack/backend build.pnpm --filter @snacktrack/frontend build.