parent
c91b46c9fb
commit
7737164bbf
1 changed files with 9 additions and 4 deletions
|
@ -54,6 +54,11 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
|||
payment: true,
|
||||
paid: true,
|
||||
title: true,
|
||||
eventType: {
|
||||
select: {
|
||||
title: true,
|
||||
},
|
||||
},
|
||||
description: true,
|
||||
startTime: true,
|
||||
endTime: true,
|
||||
|
@ -89,11 +94,11 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
|||
const t = await getTranslation(req.body.language ?? "en", "common");
|
||||
|
||||
const evt: CalendarEvent = {
|
||||
type: bookingToDelete?.title,
|
||||
title: bookingToDelete?.title,
|
||||
type: bookingToDelete?.eventType?.title as string,
|
||||
description: bookingToDelete?.description || "",
|
||||
startTime: bookingToDelete?.startTime.toString(),
|
||||
endTime: bookingToDelete?.endTime.toString(),
|
||||
startTime: bookingToDelete?.startTime.toISOString(),
|
||||
endTime: bookingToDelete?.endTime.toISOString(),
|
||||
organizer: {
|
||||
email: organizer.email,
|
||||
name: organizer.name ?? "Nameless",
|
||||
|
@ -152,7 +157,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
|||
|
||||
if (bookingToDelete && bookingToDelete.paid) {
|
||||
const evt: CalendarEvent = {
|
||||
type: bookingToDelete.title,
|
||||
type: bookingToDelete?.eventType?.title as string,
|
||||
title: bookingToDelete.title,
|
||||
description: bookingToDelete.description ?? "",
|
||||
startTime: bookingToDelete.startTime.toISOString(),
|
||||
|
|
Loading…
Reference in a new issue