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:
@@ -429,7 +429,7 @@ export class OrderSchema extends PothosSchema {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
if (overlapSchedule) {
|
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
|
// check if input schedule has order id then throw error
|
||||||
const schedule = await this.prisma.schedule.findUnique({
|
const schedule = await this.prisma.schedule.findUnique({
|
||||||
|
|||||||
Reference in New Issue
Block a user