feat: #11922 Allowed cancellation for Past time slots

pull/11949/head
Prayag Bose 2023-10-17 19:43:14 +05:30
parent 75d7d2f172
commit aa7cc9572f
1 changed files with 0 additions and 4 deletions

View File

@ -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" });
}