Commit Graph

4 Commits

Author SHA1 Message Date
510787bc5b fix tests + flyer upload (anon)
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Failing after 42s
2025-12-30 10:32:58 -08:00
a10f84aa48 complete project using prettier! 2025-12-22 09:45:14 -08:00
56f14f6342 feat: Enhance API validation and error handling across routes
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Has been cancelled
- Added tests for invalid request bodies in price and recipe routes.
- Improved type safety in request handlers using Zod schemas.
- Introduced a consistent validation pattern for empty request bodies.
- Enhanced error messages for invalid query parameters in stats and user routes.
- Implemented middleware to inject mock logging for tests.
- Created a custom type for validated requests to streamline type inference.
2025-12-14 12:53:10 -08:00
728f4a5f7e Refactor useWatchedItems hook to utilize useApi for API calls, update tests accordingly
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Failing after 18m15s
- Replaced direct API calls in useWatchedItems with useApi hook for add and remove watched items.
- Updated tests for useWatchedItems to mock useApi and verify API interactions.
- Consolidated error handling for API calls in useWatchedItems.
- Adjusted related hooks and components to ensure compatibility with the new structure.
- Added new ScaleIcon component for UI consistency.
- Implemented useFlyerItems and useFlyers hooks for fetching flyer data.
- Created useMasterItems and useUserData hooks for managing master grocery items and user data.
- Developed useInfiniteQuery hook for handling paginated API responses.
- Added comprehensive tests for useApi and useInfiniteQuery hooks.
- Introduced comparePrices API endpoint and corresponding client-side functionality.
2025-12-13 08:57:15 -08:00