Files
calendar/packages/features/platform-oauth-client/platform-oauth-client.repository.ts
T
Lauris SkraucisandGitHub 4a53ec0b74 feat: platform toggle calendar event creation (#21788)
* feat: add areCalendarEventsEnabled to PlatformOAuthClient table

* feat: areCalendarEvents enabled in handleNewBooking and v2

* feat: v2 handle areCalendarEventsEnabled

* feat: toggle areCalendarEventsEnabled on frontend

* feat: enable areCalendarEventsEnabled for recurring,confirm,paid

* refactor: use placeholder calendar event

* remove merge conflicts

* chore: bump libraries

* chore: bump libraries
2025-06-13 14:15:47 +00:00

25 lines
587 B
TypeScript

import { captureException } from "@sentry/nextjs";
import prisma from "@calcom/prisma";
import type { IPlatformOAuthClientRepository } from "./platform-oauth-client.repository.interface";
export class PlatformOAuthClientRepository implements IPlatformOAuthClientRepository {
async getByUserId(userId: number) {
try {
return prisma.platformOAuthClient.findFirst({
where: {
users: {
some: {
id: userId,
},
},
},
});
} catch (err) {
captureException(err);
throw err;
}
}
}