feat: #11922 Removed error for cancelling past time slots (#12126)

Co-authored-by: Rahul Roy <[email protected]>
This commit is contained in:
Rahul RoyandRahul Roy authored and GitHub committed 2023-11-03 11:29:41 +00:00
1 parent ed04062540
commit dff89a4df8
2 files changed
-8

No files matched your search

@@ -129,10 +129,6 @@ async function handler(req: CustomRequest) {
throw new HttpError({ statusCode: 400, message: "Booking not found" });
}
if (userId !== bookingToDelete.user?.id && bookingToDelete.startTime < new Date()) {
throw new HttpError({ statusCode: 400, message: "Cannot cancel past events" });
}
if (!bookingToDelete.userId) {
throw new HttpError({ statusCode: 400, message: "User not found" });
}