Fix Zapier sample data and payload (#5241)

* fix zapier example and payload

* fix type error

Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Carina Wollendorfer 2022-10-28 11:09:15 +02:00 committed by GitHub
parent 39747a151c
commit 0746b1e372
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View File

@ -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,

View File

@ -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,