added null eventtypeid fix (#2108)

pull/2113/head^2
Syed Ali Shahbaz 2022-03-11 14:30:25 +05:30 committed by GitHub
parent 21bc4f9386
commit ec06f645bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -134,7 +134,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
// Send Webhook call if hooked to BOOKING.CANCELLED
const subscriberOptions = {
userId: bookingToDelete.userId,
eventTypeId: bookingToDelete.eventTypeId as number,
eventTypeId: (bookingToDelete.eventTypeId as number) || 0,
triggerEvent: eventTrigger,
};
const subscribers = await getSubscribers(subscriberOptions);