added null eventtypeid fix (#2108)
parent
21bc4f9386
commit
ec06f645bd
|
@ -134,7 +134,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||||
// Send Webhook call if hooked to BOOKING.CANCELLED
|
// Send Webhook call if hooked to BOOKING.CANCELLED
|
||||||
const subscriberOptions = {
|
const subscriberOptions = {
|
||||||
userId: bookingToDelete.userId,
|
userId: bookingToDelete.userId,
|
||||||
eventTypeId: bookingToDelete.eventTypeId as number,
|
eventTypeId: (bookingToDelete.eventTypeId as number) || 0,
|
||||||
triggerEvent: eventTrigger,
|
triggerEvent: eventTrigger,
|
||||||
};
|
};
|
||||||
const subscribers = await getSubscribers(subscriberOptions);
|
const subscribers = await getSubscribers(subscriberOptions);
|
||||||
|
|
Loading…
Reference in New Issue