adjust booking file
parent
664e697d40
commit
542beb0079
|
@ -84,15 +84,17 @@ async function createOrlistAllBookings(
|
||||||
if (booking) {
|
if (booking) {
|
||||||
res.status(201).json({ booking, message: "Booking created successfully" });
|
res.status(201).json({ booking, message: "Booking created successfully" });
|
||||||
|
|
||||||
// Send Webhook call if hooked to BOOKING_CREATED & BOOKING_RESCHEDULED
|
// Create Calendar Event for webhook payload
|
||||||
// const eventTrigger: WebhookTriggerEvents = rescheduleUid ? "BOOKING_RESCHEDULED" : "BOOKING_CREATED";
|
|
||||||
|
// Send Webhook call if hooked to BOOKING_CREATED & BOOKING_RESCHEDULED
|
||||||
|
// const eventTrigger = WebhookTriggerEvents.BOOKING_CREATED;
|
||||||
// const subscriberOptions = {
|
// const subscriberOptions = {
|
||||||
// userId: user.id,
|
// userId: user.id,
|
||||||
// eventTypeId,
|
// eventTypeId,
|
||||||
// triggerEvent: eventTrigger,
|
// triggerEvent: eventTrigger,
|
||||||
// };
|
// };
|
||||||
|
|
||||||
// const subscribers = await getSubscribers(subscriberOptions);
|
// const subscribers = await getWebhooks(subscriberOptions);
|
||||||
// const bookingId = booking?.id;
|
// const bookingId = booking?.id;
|
||||||
// const promises = subscribers.map((sub) =>
|
// const promises = subscribers.map((sub) =>
|
||||||
// sendPayload(eventTrigger, new Date().toISOString(), sub, {
|
// sendPayload(eventTrigger, new Date().toISOString(), sub, {
|
||||||
|
|
Loading…
Reference in New Issue