From fd8275ed27dd7783ad6d7a7e5395a7c0b336fad1 Mon Sep 17 00:00:00 2001 From: David M <62346025+aboutdavid@users.noreply.github.com> Date: Sat, 19 Oct 2024 14:33:14 -0400 Subject: [PATCH] add featured channels api --- index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/index.js b/index.js index 2dec75e..97700d0 100644 --- a/index.js +++ b/index.js @@ -56,6 +56,15 @@ Array.prototype.random = function () { }) res.json(channels) }); + receiver.router.get("/featured", async (req, res) => { + const channels = await prisma.channel.findMany({ + where: { + featured: true + } + }) + res.json(channels) + }); + await require("./commands/optout")({ app, client, prisma }); await require("./commands/setlocation")({ app, client, prisma });