The recipes.blue monorepo recipes.blue
recipes appview atproto

fix: resolve imageUrl to null if necessary

+6 -2
+6 -2
apps/api/src/xrpc/index.ts
··· 52 description: r.description || undefined, 53 ingredients: r.ingredientsCount as number, 54 steps: r.stepsCount as number, 55 - imageUrl: `https://cdn.bsky.app/img/feed_thumbnail/plain/${r.authorDid}/${r.imageRef}@jpeg`, 56 }); 57 58 for (const result of recipes) { ··· 112 description: recipe.description, 113 ingredients: recipe.ingredients, 114 steps: recipe.steps, 115 - imageUrl: `https://cdn.bsky.app/img/feed_thumbnail/plain/${recipe.authorDid}/${recipe.imageRef}@jpeg`, 116 }, 117 }); 118 });
··· 52 description: r.description || undefined, 53 ingredients: r.ingredientsCount as number, 54 steps: r.stepsCount as number, 55 + imageUrl: r.imageRef 56 + ? `https://cdn.bsky.app/img/feed_thumbnail/plain/${r.authorDid}/${r.imageRef}@jpeg` 57 + : null, 58 }); 59 60 for (const result of recipes) { ··· 114 description: recipe.description, 115 ingredients: recipe.ingredients, 116 steps: recipe.steps, 117 + imageUrl: recipe.imageRef 118 + ? `https://cdn.bsky.app/img/feed_thumbnail/plain/${recipe.authorDid}/${recipe.imageRef}@jpeg` 119 + : null, 120 }, 121 }); 122 });