Files
calendar/packages/lib/server/repository/host.ts
T

18 lines
429 B
TypeScript

import type { PrismaClient } from "@calcom/prisma";
export class HostRepository {
constructor(private prismaClient: PrismaClient) {}
async updateHostsSchedule(userId: number, oldScheduleId: number, newScheduleId: number) {
return await this.prismaClient.host.updateMany({
where: {
userId,
scheduleId: oldScheduleId,
},
data: {
scheduleId: newScheduleId,
},
});
}
}