// Get a deposit by id from the current user
getById: protectedProcedure
.input(z.object({ id: z.string() }))
.query(async ({ ctx, input }) => {
const deposit = await ctx.prisma.deposit.findFirst({
where: {
id: input.id,
userId: ctx.session.user.id,
},
});
return deposit;
}),
// Get a deposit by id from the current user
getById: protectedProcedure
.input(z.object({ id: z.string() }))
.query(async ({ ctx, input }) => {
const deposit = await ctx.prisma.deposit.findFirst({
where: {
id: input.id,
userId: ctx.session.user.id,
},
});
return deposit;
}),