Merge branch 'main' into production

pull/9078/head
Syed Ali Shahbaz 2022-06-12 11:30:48 +05:30
commit e278e13e83
1 changed files with 2 additions and 2 deletions

View File

@ -88,8 +88,6 @@ async function createOrlistAllBookings(
const booking = schemaBookingReadPublic.parse(data);
if (booking) {
res.status(201).json({ booking, message: "Booking created successfully" });
// Create Calendar Event for webhook payload
const eventType = await prisma.eventType
.findUnique({ where: { id: booking.eventTypeId as number } })
.then((data) => schemaEventTypeReadPublic.parse(data))
@ -139,6 +137,8 @@ async function createOrlistAllBookings(
})
);
await Promise.all(promises);
res.status(201).json({ booking, message: "Booking created successfully" });
} else
(error: Error) => {
console.log(error);