diff --git a/src/routes/api/recipes/items/all_brief/+server.ts b/src/routes/api/recipes/items/all_brief/+server.ts index 799cf16..481d26d 100644 --- a/src/routes/api/recipes/items/all_brief/+server.ts +++ b/src/routes/api/recipes/items/all_brief/+server.ts @@ -10,7 +10,7 @@ export const GET: RequestHandler = async ({params}) => { // Find all recipes that have approved English translations const recipes = await Recipe.find( { 'translations.en.translationStatus': 'approved' }, - '_id translations.en short_name season dateModified icon' + '_id translations.en short_name season dateModified icon images' ).lean(); // Map to brief format with English data @@ -24,7 +24,8 @@ export const GET: RequestHandler = async ({params}) => { description: recipe.translations.en.description, season: recipe.season || [], dateModified: recipe.dateModified, - germanShortName: recipe.short_name // For language switcher + germanShortName: recipe.short_name, // For language switcher + images: recipe.images || [] })) as BriefRecipeType[]; return json(JSON.parse(JSON.stringify(rand_array(found_brief)))); diff --git a/src/routes/api/rezepte/items/all_brief/+server.ts b/src/routes/api/rezepte/items/all_brief/+server.ts index 5c114fe..594f1ca 100644 --- a/src/routes/api/rezepte/items/all_brief/+server.ts +++ b/src/routes/api/rezepte/items/all_brief/+server.ts @@ -17,7 +17,7 @@ export const GET: RequestHandler = async ({params}) => { } else { // Cache miss - fetch from DB await dbConnect(); - recipes = await Recipe.find({}, 'name short_name tags category icon description season dateModified').lean() as BriefRecipeType[]; + recipes = await Recipe.find({}, 'name short_name tags category icon description season dateModified images').lean() as BriefRecipeType[]; // Store in cache (1 hour TTL) await cache.set(cacheKey, JSON.stringify(recipes), 3600);