From e1afd542ac8fb555828cb8fe6a19e47c4abab7e2 Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Fri, 10 Apr 2026 10:17:32 +0200 Subject: [PATCH] fix(24): add withImageUrls to public setup endpoint Public setup view was missing image URL enrichment, causing item images to be absent for anonymous visitors. Matches the private endpoint pattern. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/server/routes/setups.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server/routes/setups.ts b/src/server/routes/setups.ts index 212c870..7828f32 100644 --- a/src/server/routes/setups.ts +++ b/src/server/routes/setups.ts @@ -48,7 +48,8 @@ app.get("/:id/public", async (c) => { if (!id) return c.json({ error: "Invalid setup ID" }, 400); const setup = await getPublicSetupWithItems(db, id); if (!setup) return c.json({ error: "Setup not found" }, 404); - return c.json(setup); + const enrichedItems = await withImageUrls(setup.items); + return c.json({ ...setup, items: enrichedItems }); }); app.get("/:id", async (c) => {