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:
authored and GitHub committed 2023-05-22 23:15:06 +00:00
1 parent 6586ed4d87
commit fbe0018d01
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));