Removes deprecated rejectOnNotFound

This commit is contained in:
zomars
2022-12-21 17:48:15 -07:00
parent d5ca121ac6
commit cd56a5d4f0
@@ -647,14 +647,10 @@ export const bookingsRouter = router({
const tOrganizer = await getTranslation(user.locale ?? "en", "common");
const booking = await prisma.booking.findFirst({
const booking = await prisma.booking.findUniqueOrThrow({
where: {
id: bookingId,
},
rejectOnNotFound() {
throw new TRPCError({ code: "NOT_FOUND", message: "Booking not found" });
},
// should trpc handle this error ?
select: {
title: true,
description: true,