export const challengesRouter = router({ getChallengeById: privateProcedure .input(z.string().uuid()) .query(async ({ input }) => { const challenge = await db.query.challengeTable.findFirst({ where: (columns, { eq }) => eq(columns.sectionId, input), columns: { id: true, sectionId: true, }, }); return challenge; }),});
export const challengesRouter = router({ getChallengeById: privateProcedure .input(z.string().uuid()) .query(async ({ input, ctx }) => { const challenge = await ctx.db.query.challengeTable.findFirst({ where: (columns, { eq }) => eq(columns.sectionId, input), columns: { id: true, sectionId: true, }, }); return challenge; }),});