mirror of
https://github.com/hanzoai/calendar.git
synced 2026-10-30 14:46:43 +00:00
* feat: link email to participatn * fix: bugs * refactor: improve code * refactor: prevent repload * chore: remove unued * fix: type * refactor * fix: type * feat: restrict host * feat: type * feat: tests * fix: don't allow guest * fix: merk guest * fix: bugs * fix: test * fix: test * refactor: feedback * fix: tests --------- Co-authored-by: Volnei Munhoz <[email protected]>
31 lines
563 B
TypeScript
31 lines
563 B
TypeScript
import type { PrismaClient } from "@calcom/prisma";
|
|
|
|
export class VideoCallGuestRepository {
|
|
constructor(private prismaClient: PrismaClient) {}
|
|
|
|
async upsertVideoCallGuest({
|
|
bookingUid,
|
|
email,
|
|
name,
|
|
}: {
|
|
bookingUid: string;
|
|
email: string;
|
|
name: string;
|
|
}) {
|
|
return await this.prismaClient.videoCallGuest.upsert({
|
|
where: {
|
|
bookingUid_email: {
|
|
bookingUid,
|
|
email,
|
|
},
|
|
},
|
|
update: { name },
|
|
create: {
|
|
bookingUid,
|
|
email,
|
|
name,
|
|
},
|
|
});
|
|
}
|
|
}
|