fix: include images and translations in offline-db brief recipes
All checks were successful
CI / update (push) Successful in 1m26s

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 d9e9ae049e
commit 763edb35c3

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