From 763edb35c3461007b7e0b5ebc7325d560b857339 Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Thu, 29 Jan 2026 10:18:17 +0100 Subject: [PATCH] fix: include images and translations in offline-db brief recipes The offline sync wasn't caching thumbnails because the images field was missing from the MongoDB projection. Also add translations for caching English recipe __data.json URLs. --- src/routes/api/rezepte/offline-db/+server.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/api/rezepte/offline-db/+server.ts b/src/routes/api/rezepte/offline-db/+server.ts index 133c0c1..9488671 100644 --- a/src/routes/api/rezepte/offline-db/+server.ts +++ b/src/routes/api/rezepte/offline-db/+server.ts @@ -7,9 +7,10 @@ export const GET: RequestHandler = async () => { await dbConnect(); // Fetch brief recipes (for lists/filtering) + // Include images for thumbnail caching during offline sync const briefRecipes = await Recipe.find( {}, - 'name short_name tags category icon description season dateModified' + 'name short_name tags category icon description season dateModified images translations' ).lean() as BriefRecipeType[]; // Fetch full recipes with populated base recipe references