fix: cancelled booking doesn't show the booker (#8203)
* fix: remove attendee deletion * chore: add test id * test: add e2e * Fix data-testid placeholder * Fix prettier error --------- Co-authored-by: Peer Richelsen <[email protected]> Co-authored-by: alannnc <[email protected]>
This commit is contained in:
5 files changed
+31
-19
No files matched your search
@@ -629,12 +629,6 @@ async function handler(req: CustomRequest) {
|
||||
return { message: "Booking successfully cancelled." };
|
||||
}
|
||||
|
||||
const attendeeDeletes = prisma.attendee.deleteMany({
|
||||
where: {
|
||||
bookingId: bookingToDelete.id,
|
||||
},
|
||||
});
|
||||
|
||||
const bookingReferenceDeletes = prisma.bookingReference.deleteMany({
|
||||
where: {
|
||||
bookingId: bookingToDelete.id,
|
||||
@@ -657,7 +651,7 @@ async function handler(req: CustomRequest) {
|
||||
});
|
||||
});
|
||||
|
||||
const prismaPromises: Promise<unknown>[] = [attendeeDeletes, bookingReferenceDeletes];
|
||||
const prismaPromises: Promise<unknown>[] = [bookingReferenceDeletes];
|
||||
|
||||
await Promise.all(prismaPromises.concat(apiDeletes));
|
||||
|
||||
|
||||
Reference in new issue
Block a user