integration tests fixes
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 4m13s
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 4m13s
This commit is contained in:
@@ -171,7 +171,15 @@ export const flyerWorker = new Worker<FlyerJobData>(
|
||||
uploaded_by: userId,
|
||||
};
|
||||
|
||||
const newFlyer = await db.createFlyerAndItems(flyerData, extractedData.items);
|
||||
// Map the AI-extracted DTOs to the shape expected by the database, adding default values.
|
||||
const itemsForDb = extractedData.items.map(item => ({
|
||||
...item,
|
||||
view_count: 0,
|
||||
click_count: 0,
|
||||
updated_at: new Date().toISOString(),
|
||||
}));
|
||||
|
||||
const newFlyer = await db.createFlyerAndItems(flyerData, itemsForDb);
|
||||
logger.info(`[Worker] Successfully saved new flyer ID: ${newFlyer.flyer_id}`);
|
||||
|
||||
// 4. Log activity
|
||||
|
||||
Reference in New Issue
Block a user