Revert - create new bookings - writing team members to DB (#7756)

* Bring back creating team members

* Clean up console.logs

* Push into attendeesData

---------

Co-authored-by: Alex van Andel <me@alexvanandel.com>
pull/7769/head
Joe Au-Yeung 2023-03-15 18:38:57 -04:00 committed by GitHub
parent 49d6dd9802
commit 91464fb5e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -1439,6 +1439,17 @@ async function handler(
};
});
if (evt.team?.members) {
attendeesData.push(
...evt.team.members.map((member) => ({
email: member.email,
name: member.name,
timeZone: member.timeZone,
locale: member.language.locale,
}))
);
}
const newBookingData: Prisma.BookingCreateInput = {
uid,
responses: responses === null ? Prisma.JsonNull : responses,