diff --git a/src/server/api/routers/content.ts b/src/server/api/routers/content.ts index f60a099..b6c2c50 100644 --- a/src/server/api/routers/content.ts +++ b/src/server/api/routers/content.ts @@ -115,6 +115,24 @@ export const contentRouter = createTRPCRouter({ }); }), + toggleFeaturedContent: protectedProcedure + .input( + z.object({ + id: z.string(), + isFeatured: z.boolean(), + }) + ) + .mutation(({ input, ctx }) => { + return ctx.prisma.content.update({ + where: { + id: input.id, + }, + data: { + isFeatured: input.isFeatured, + }, + }); + }), + deleteContent: protectedProcedure .input( z.object({