fix mapping for cancel webhook (#1554) (#1557) (#1556)

Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com>
Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
pull/1608/head^2
buschco 2022-01-26 17:41:18 +01:00 committed by GitHub
parent c59dce1284
commit cad77ad237
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
import { BookingStatus } from "@prisma/client"; import { BookingStatus } from "@prisma/client";
import async from "async"; import async from "async";
import dayjs from "dayjs";
import { NextApiRequest, NextApiResponse } from "next"; import { NextApiRequest, NextApiResponse } from "next";
import { refund } from "@ee/lib/stripe/server"; import { refund } from "@ee/lib/stripe/server";
@ -98,8 +99,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
title: bookingToDelete?.title, title: bookingToDelete?.title,
type: bookingToDelete?.eventType?.title as string, type: bookingToDelete?.eventType?.title as string,
description: bookingToDelete?.description || "", description: bookingToDelete?.description || "",
startTime: bookingToDelete?.startTime.toISOString(), startTime: bookingToDelete?.startTime ? dayjs(bookingToDelete.startTime).format() : "",
endTime: bookingToDelete?.endTime.toISOString(), endTime: bookingToDelete?.endTime ? dayjs(bookingToDelete.endTime).format() : "",
organizer: { organizer: {
email: organizer.email, email: organizer.email,
name: organizer.name ?? "Nameless", name: organizer.name ?? "Nameless",