* 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
25 lines
587 B
TypeScript
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;
|
|
}
|
|
}
|
|
}
|