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