fix: test return booking get

This commit is contained in:
Agusti Fernandez Pardo
2022-07-06 01:17:59 +02:00
parent 74c227f5f1
commit 44ce77f814
+2 -2
View File
@@ -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);