Skip to content

Commit

Permalink
fix: prisma type error
Browse files Browse the repository at this point in the history
  • Loading branch information
kgajera committed Aug 19, 2023
1 parent 0c200e7 commit 6e1f273
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const userRouter = t.router({
.input(z.object({ id: z.string().optional(), email: z.string().optional() }).optional())
.query(({ ctx, input }) => ctx.db.user.findMany({ where: input, select: defaultUserSelect })),
find: t.procedure
.input(z.object({ id: z.string().optional(), email: z.string().optional() }))
.input(z.union([z.object({ id: z.string() }), z.object({ email: z.string() })]))
.query(async ({ ctx, input }) => {
const user = await ctx.db.user.findUniqueOrThrow({
where: input,
Expand Down

0 comments on commit 6e1f273

Please sign in to comment.