fix: include images and translations in offline-db brief recipes
All checks were successful
CI / update (push) Successful in 1m26s
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user