fix: Reschedule a cancelled booking (#13170)

* fix: Reschedule a cancelled booking

* canceled instead of cancelled

---------

Co-authored-by: Joe Au-Yeung <[email protected]>
Co-authored-by: Carina Wollendorfer <[email protected]>
This commit is contained in:
authored and GitHub committed 2024-01-15 16:52:04 +00:00
1 parent 6612926aa5
commit e5eb121ab7
3 files changed
+9

No files matched your search

@@ -1224,6 +1224,13 @@ async function handler(
if (!originalRescheduledBooking) {
throw new HttpError({ statusCode: 404, message: "Could not find original booking" });
}
if (
originalRescheduledBooking.status === BookingStatus.CANCELLED &&
!originalRescheduledBooking.rescheduled
) {
throw new HttpError({ statusCode: 403, message: ErrorCode.CancelledBookingsCannotBeRescheduled });
}
}
//checks what users are available