Skip to content

Scheduling infrastructure for absolutely everyone.

fix: test return booking get

Agusti Fernandez Pardo44ce77f814aa
diff --git a/pages/api/bookings/[id].ts b/pages/api/bookings/[id].ts
index f4f11b143fc..6897cb0464d 100644
--- a/pages/api/bookings/[id].ts
+++ b/pages/api/bookings/[id].ts
@@ -52,7 +52,7 @@ export async function bookingById(
* description: Booking was not found
*/
case "GET":
- await prisma.booking
+ return await prisma.booking
.findUnique({ where: { id: safeQuery.data.id } })
.then((data) => schemaBookingReadPublic.parse(data))
.then((booking) => res.status(200).json({ booking }))
@@ -170,4 +170,4 @@ export async function bookingById(
}
}
-export default withMiddleware("HTTP_GET_DELETE_PATCH")(withValidQueryIdTransformParseInt(bookingById));
+export default withMiddleware("HTTP_GET_DELETE_PATCH")(bookingById);