checkTeamAuth: protectedProcedure
.input(
z.object({
teamId: z.string(),
}),
)
.query(async ({ ctx, input }) => {
return ctx.db.team.findFirst({
where: {
name: input.teamId,
members: { some: { id: ctx.session.user.id } },
},
});
}),
checkTeamAuth: protectedProcedure
.input(
z.object({
teamId: z.string(),
}),
)
.query(async ({ ctx, input }) => {
return ctx.db.team.findFirst({
where: {
name: input.teamId,
members: { some: { id: ctx.session.user.id } },
},
});
}),