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.
This commit is contained in:
2026-01-29 10:18:17 +01:00
parent 82732521b6
commit 5e7f441e3b
+2 -1
View File
@@ -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