Debug booking API
parent
4ba0e7752d
commit
910a0f386a
|
@ -35,6 +35,7 @@ async function createOrlistAllBookings(
|
|||
*/
|
||||
const data = await prisma.booking.findMany({ where: { userId } });
|
||||
const bookings = data.map((booking) => schemaBookingReadPublic.parse(booking));
|
||||
console.log(`Bookings requested by ${userId}`);
|
||||
if (bookings) res.status(200).json({ bookings });
|
||||
else
|
||||
(error: Error) =>
|
||||
|
|
Loading…
Reference in New Issue