A powerful and extendable Discord bot, with it's own module system :3 thevoid.cafe/projects/voidy

✨ Make GET /items return all items by default

Jo 7f65dcfe e36a0847

+3 -1
+3 -1
packages/api/routes/api/v1/shop.ts
··· 17 17 shop.get("/items", async (c) => { 18 18 const item = c.req.query("item"); 19 19 20 + // Return all items if no item is specified 20 21 if (!item) { 21 - return c.json({ error: "Item query parameter is required" }, 400); 22 + const locatedItems = await MinecraftShopItem.find(); 23 + return c.json(locatedItems); 22 24 } 23 25 24 26 const locatedItem = await MinecraftShopItem.findOne({ item });