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