From 6d509a4487a483f3a47f6b985a6e64519c4772ec Mon Sep 17 00:00:00 2001 From: Ly Tuan Kiet Date: Mon, 25 Nov 2024 15:02:56 +0700 Subject: [PATCH] update scheduleDate props --- src/CollaborationSession/collaborationsession.schema.ts | 2 +- src/Schedule/schedule.d.ts | 2 +- src/Schedule/schedule.service.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CollaborationSession/collaborationsession.schema.ts b/src/CollaborationSession/collaborationsession.schema.ts index d0fa295..2aa0e5d 100644 --- a/src/CollaborationSession/collaborationsession.schema.ts +++ b/src/CollaborationSession/collaborationsession.schema.ts @@ -83,7 +83,7 @@ export class CollaborationSessionSchema extends PothosSchema { if (!scheduleDate) throw new Error('Schedule date not found') let collaborationSession: CollaborationSession | null = null collaborationSession = - await this.prisma.collaborationSession.findUniqueOrThrow({ + await this.prisma.collaborationSession.findUnique({ where: { scheduleDateId: scheduleDate.id, }, diff --git a/src/Schedule/schedule.d.ts b/src/Schedule/schedule.d.ts index 734a184..c9a67b5 100644 --- a/src/Schedule/schedule.d.ts +++ b/src/Schedule/schedule.d.ts @@ -5,7 +5,7 @@ export interface ScheduleDateInput { dayOfWeek: number slot: number serviceId: string - participants: string[] + participantIds: string[] orderId: string | null } diff --git a/src/Schedule/schedule.service.ts b/src/Schedule/schedule.service.ts index 1bdd9ae..448f0d8 100644 --- a/src/Schedule/schedule.service.ts +++ b/src/Schedule/schedule.service.ts @@ -96,7 +96,7 @@ export class ScheduleService { end: endTime.toISO() ?? '', dayOfWeek: date.weekday, slot: slot, - participants: [], + participantIds: [], serviceId: schedule.managedServiceId, orderId: schedule.orderId, })