fix serialization error

This commit is contained in:
Thomas Ruoff
2022-10-11 12:02:06 +02:00
parent aebc50f917
commit 4b313d2df3

View File

@@ -38,6 +38,8 @@ export const getServerSideBooking = async (
const uuid = Array.isArray(uuids) ? uuids[0] : uuids
const booking = await getBookingByUUID(uuid)
console.log(booking.createdAt);
if (!booking) {
res.statusCode = 404
res.end()
@@ -45,6 +47,10 @@ export const getServerSideBooking = async (
}
return {
props: { booking },
props: { booking: {
...booking,
createdAt: booking.createdAt.toISOString(),
updatedAt: booking.updatedAt.toISOString(),
}},
}
}