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 commitpull/3670/head^24fe99af475
. revert delete yarn.lock * Delete yarn.lock * Revert "Delete yarn.lock" This reverts commit9f76a548e0
. revert delete yarn.lock * Revert "yarn update" This reverts commit2bef496c16
. * yarn * remove yarn.lock * remove yarn.lock * removed double declaration * Revert "yarn update" This reverts commit2bef496c16
. * stop tracking yarn lockfile * undo all yarn lockfile changes * Revert "yarn" This reverts commit46eb3595cf
. * remove all yarn changes * Update packages/trpc/server/routers/viewer/bookings.tsx Co-authored-by: Omar López <zomars@me.com> * zod transform insteead of ternary operator Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: Omar López <zomars@me.com>
parent
48a1f22ca5
commit
b3b82fa1cf
|
@ -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<any> {
|
async updateEvent(uid: string, event: CalendarEvent): Promise<any> {
|
||||||
try {
|
try {
|
||||||
const appointment = await Appointment.Bind(
|
const appointment = await Appointment.Bind(
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { SchedulingType } from "@prisma/client";
|
import { SchedulingType } from "@prisma/client";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import { LocationType } from "@calcom/app-store/locations";
|
||||||
import EventManager from "@calcom/core/EventManager";
|
import EventManager from "@calcom/core/EventManager";
|
||||||
import dayjs from "@calcom/dayjs";
|
import dayjs from "@calcom/dayjs";
|
||||||
import { sendLocationChangeEmails } from "@calcom/emails";
|
import { sendLocationChangeEmails } from "@calcom/emails";
|
||||||
|
@ -65,7 +66,7 @@ export const bookingsRouter = createProtectedRouter()
|
||||||
})
|
})
|
||||||
.mutation("editLocation", {
|
.mutation("editLocation", {
|
||||||
input: commonBookingSchema.extend({
|
input: commonBookingSchema.extend({
|
||||||
newLocation: z.string(),
|
newLocation: z.string().transform((val) => val || LocationType.Daily),
|
||||||
}),
|
}),
|
||||||
async resolve({ ctx, input }) {
|
async resolve({ ctx, input }) {
|
||||||
const { bookingId, newLocation: location } = input;
|
const { bookingId, newLocation: location } = input;
|
||||||
|
|
Loading…
Reference in New Issue