Debug booking API

pull/9078/head
Syed Ali Shahbaz 2022-06-11 22:39:03 +05:30 committed by GitHub
parent 4ba0e7752d
commit 910a0f386a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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) =>