Fix Zapier sample data and payload (#5241)

* fix zapier example and payload

* fix type error

Co-authored-by: CarinaWolli <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2022-10-28 09:09:15 +00:00
1 parent 39747a151c
commit 0746b1e372
2 files changed
+17 -1

No files matched your search

@@ -33,7 +33,15 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
location: true,
cancellationReason: true,
status: true,
user: true,
user: {
select: {
username: true,
name: true,
email: true,
timeZone: true,
locale: true,
},
},
eventType: {
select: {
title: true,
@@ -36,6 +36,14 @@ function getZapierPayload(data: CalendarEvent & EventTypeInfo & { status?: strin
endTime: data.endTime,
location: location,
status: data.status,
cancellationReason: data.cancellationReason,
user: {
username: data.organizer.username,
name: data.organizer.name,
email: data.organizer.email,
timeZone: data.organizer.timeZone,
locale: data.organizer.locale,
},
eventType: {
title: data.eventTitle,
description: data.eventDescription,