mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 15:07:13 +01:00
fix serialization error
This commit is contained in:
@@ -38,6 +38,8 @@ export const getServerSideBooking = async (
|
|||||||
const uuid = Array.isArray(uuids) ? uuids[0] : uuids
|
const uuid = Array.isArray(uuids) ? uuids[0] : uuids
|
||||||
const booking = await getBookingByUUID(uuid)
|
const booking = await getBookingByUUID(uuid)
|
||||||
|
|
||||||
|
console.log(booking.createdAt);
|
||||||
|
|
||||||
if (!booking) {
|
if (!booking) {
|
||||||
res.statusCode = 404
|
res.statusCode = 404
|
||||||
res.end()
|
res.end()
|
||||||
@@ -45,6 +47,10 @@ export const getServerSideBooking = async (
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
props: { booking },
|
props: { booking: {
|
||||||
|
...booking,
|
||||||
|
createdAt: booking.createdAt.toISOString(),
|
||||||
|
updatedAt: booking.updatedAt.toISOString(),
|
||||||
|
}},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user