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

@@ -47,7 +47,7 @@ export const VoiceLabPage: React.FC = () => {
} catch (error) {
console.error('[VoiceLabPage] Error caught:', error);
const errorMessage = error instanceof Error ? error.message : 'An unknown error occurred.';
logger.error('Failed to generate speech:', { error: errorMessage });
logger.error({ err: error }, 'Failed to generate speech:');
notifyError(`Speech generation failed: ${errorMessage}`);
} finally {
console.log('[VoiceLabPage] finally block - setting isGeneratingSpeech false');
@@ -66,7 +66,7 @@ export const VoiceLabPage: React.FC = () => {
});
} catch (error) {
const errorMessage = error instanceof Error ? error.message : 'An unknown error occurred.';
logger.error('Failed to start voice session:', { error: errorMessage });
logger.error({ err: error }, 'Failed to start voice session:');
notifyError(`Could not start voice session: ${errorMessage}`);
}
};