fix: update error message for schedule overlap in OrderSchema

- Changed the error message thrown when a user has an overlapping schedule from "User has already registered for this service" to "User have overlap schedule" for improved clarity.
- This update aims to enhance user feedback during order processing, ensuring a better understanding of scheduling conflicts.
This commit is contained in:
2025-01-16 19:20:28 +07:00
parent 1896974484
commit a90811af86

View File

@@ -429,7 +429,7 @@ export class OrderSchema extends PothosSchema {
},
});
if (overlapSchedule) {
throw new Error("User has already registered for this service");
throw new Error("User have overlap schedule");
}
// check if input schedule has order id then throw error
const schedule = await this.prisma.schedule.findUnique({