fix: Duplicate calendar events (#11327)

Co-authored-by: Shivam Kalra <[email protected]>
Co-authored-by: zomars <[email protected]>
Co-authored-by: Alan <[email protected]>
This commit is contained in:
authored and GitHub committed 2023-09-14 09:53:58 -07:00
1 parent add297b09a
commit 197b435b6f
35 files changed
+313 -212

No files matched your search

+4 -1
View File
@@ -5,6 +5,7 @@ import { getCalendarCredentials, getConnectedCalendars } from "@calcom/core/Cale
import { getServerSession } from "@calcom/features/auth/lib/getServerSession";
import notEmpty from "@calcom/lib/notEmpty";
import prisma from "@calcom/prisma";
import { credentialForCalendarServiceSelect } from "@calcom/prisma/selects/credential";
const selectedCalendarSelectSchema = z.object({
integration: z.string(),
@@ -25,7 +26,9 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
id: session.user.id,
},
select: {
credentials: true,
credentials: {
select: credentialForCalendarServiceSelect,
},
timeZone: true,
id: true,
selectedCalendars: true,