Skip to content

Commit

Permalink
add featured channels api
Browse files Browse the repository at this point in the history
  • Loading branch information
dispherical committed Oct 19, 2024
1 parent 9aba3d8 commit fd8275e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down

0 comments on commit fd8275e

Please sign in to comment.