feat: Implement deals repository and routes for fetching best watched item prices
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Has been cancelled

- Added a new DealsRepository class to interact with the database for fetching the best sale prices of watched items.
- Created a new route `/api/users/deals/best-watched-prices` to handle requests for the best prices of items the authenticated user is watching.
- Enhanced logging in the FlyerDataTransformer and FlyerProcessingService for better traceability.
- Updated tests to ensure proper logging and functionality in the FlyerProcessingService.
- Refactored logger client to support structured logging for better consistency across the application.
This commit is contained in:
2025-12-13 20:02:18 -08:00
parent 2affda25dc
commit 424cbaf0d4
22 changed files with 409 additions and 241 deletions

View File

@@ -37,7 +37,7 @@ export const AdminStatsPage: React.FC = () => {
setStats(data);
} catch (err) {
const errorMessage = err instanceof Error ? err.message : 'An unknown error occurred.';
logger.error('Failed to fetch application stats', { error: err });
logger.error({ err }, 'Failed to fetch application stats');
setError(errorMessage);
} finally {
setIsLoading(false);