From aa7cc9572fd7996d650065c884b0e5b8e3f2c621 Mon Sep 17 00:00:00 2001 From: Prayag Bose Date: Tue, 17 Oct 2023 19:43:14 +0530 Subject: [PATCH] feat: #11922 Allowed cancellation for Past time slots --- packages/features/bookings/lib/handleCancelBooking.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/features/bookings/lib/handleCancelBooking.ts b/packages/features/bookings/lib/handleCancelBooking.ts index b4fb989203..de4506270a 100644 --- a/packages/features/bookings/lib/handleCancelBooking.ts +++ b/packages/features/bookings/lib/handleCancelBooking.ts @@ -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" }); }