Removed error for cancelling past time slots
parent
901fc36c97
commit
b350db3393
|
@ -56,10 +56,6 @@ import { schemaQueryIdParseInt } from "~/lib/validations/shared/queryIdTransform
|
|||
* <td>The provided id didn't correspond to any existing booking.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>Cannot cancel past events</td>
|
||||
* <td>The provided id matched an existing booking with a past startDate.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>User not found</td>
|
||||
* <td>The userId did not matched an existing user.</td>
|
||||
* </tr>
|
||||
|
|
|
@ -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" });
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue