From b3b82fa1cff56235e99c5fa91056afb9f3237a80 Mon Sep 17 00:00:00 2001 From: Om Ray <38233712+om-ray@users.noreply.github.com> Date: Wed, 3 Aug 2022 21:05:08 +0530 Subject: [PATCH] When no location, defaults to cal video (#3517) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * yarn * fixed bug * fixed warning * fixed problem on server side * yarn update * Delete yarn.lock * removed unused type * Revert "Delete yarn.lock" This reverts commit 4fe99af4757343d9efb2326be546cd81161c8da3. revert delete yarn.lock * Delete yarn.lock * Revert "Delete yarn.lock" This reverts commit 9f76a548e0950202674e5c5fcb755db3ff7867bd. revert delete yarn.lock * Revert "yarn update" This reverts commit 2bef496c1693acd509a7b577ca7013e94ab7200a. * yarn * remove yarn.lock * remove yarn.lock * removed double declaration * Revert "yarn update" This reverts commit 2bef496c1693acd509a7b577ca7013e94ab7200a. * stop tracking yarn lockfile * undo all yarn lockfile changes * Revert "yarn" This reverts commit 46eb3595cf687504c6783315749b3124936080b9. * remove all yarn changes * Update packages/trpc/server/routers/viewer/bookings.tsx Co-authored-by: Omar López * zod transform insteead of ternary operator Co-authored-by: Peer Richelsen Co-authored-by: Omar López --- packages/app-store/exchange2013calendar/lib/CalendarService.ts | 1 + packages/trpc/server/routers/viewer/bookings.tsx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/app-store/exchange2013calendar/lib/CalendarService.ts b/packages/app-store/exchange2013calendar/lib/CalendarService.ts index 35adbf5558..896c494de9 100644 --- a/packages/app-store/exchange2013calendar/lib/CalendarService.ts +++ b/packages/app-store/exchange2013calendar/lib/CalendarService.ts @@ -90,6 +90,7 @@ export default class ExchangeCalendarService implements Calendar { } } + // eslint-disable-next-line @typescript-eslint/no-explicit-any async updateEvent(uid: string, event: CalendarEvent): Promise { try { const appointment = await Appointment.Bind( diff --git a/packages/trpc/server/routers/viewer/bookings.tsx b/packages/trpc/server/routers/viewer/bookings.tsx index 65ba0de870..17dcc93d5f 100644 --- a/packages/trpc/server/routers/viewer/bookings.tsx +++ b/packages/trpc/server/routers/viewer/bookings.tsx @@ -1,6 +1,7 @@ import { SchedulingType } from "@prisma/client"; import { z } from "zod"; +import { LocationType } from "@calcom/app-store/locations"; import EventManager from "@calcom/core/EventManager"; import dayjs from "@calcom/dayjs"; import { sendLocationChangeEmails } from "@calcom/emails"; @@ -65,7 +66,7 @@ export const bookingsRouter = createProtectedRouter() }) .mutation("editLocation", { input: commonBookingSchema.extend({ - newLocation: z.string(), + newLocation: z.string().transform((val) => val || LocationType.Daily), }), async resolve({ ctx, input }) { const { bookingId, newLocation: location } = input;