Co-authored-by: Rahul Roy <[email protected]>
This commit is contained in:
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" });
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user