When no location, defaults to cal video (#3517)

* 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 <[email protected]>

* zod transform insteead of ternary operator

Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: Omar López <[email protected]>
This commit is contained in:
authored and GitHub committed 2022-08-03 09:35:08 -06:00
1 parent 48a1f22ca5
commit b3b82fa1cf
2 files changed
+3 -1

No files matched your search

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