Update EventManager.ts

fixes/payment-schema
zomars 2022-04-12 13:05:27 -07:00
parent 8ae95ae79a
commit bfe83cd03f
1 changed files with 2 additions and 2 deletions

View File

@ -228,8 +228,8 @@ export default class EventManager {
},
});
// Wait for all deletions to be applied.
await Promise.all([bookingReferenceDeletes, attendeeDeletes, bookingDeletes]);
// Wait for all deletions to be applied. If one fails, all should revert.
await prisma.$transaction([bookingReferenceDeletes, attendeeDeletes, bookingDeletes]);
return {
results,