fix: metadata not saved while creating a booking. (#6866)
* feat: add metadata to booking creation * fix: bugfeature/alert-no-availability-selected
parent
cc56602474
commit
390967990a
|
@ -744,6 +744,7 @@ async function handler(req: NextApiRequest & { userId?: number | undefined }) {
|
|||
location: evt.location,
|
||||
eventType: eventTypeRel,
|
||||
smsReminderNumber: reqBody.smsReminderNumber,
|
||||
metadata: reqBody.metadata,
|
||||
attendees: {
|
||||
createMany: {
|
||||
data: evt.attendees.map((attendee) => {
|
||||
|
@ -1140,7 +1141,7 @@ async function handler(req: NextApiRequest & { userId?: number | undefined }) {
|
|||
uid: booking.uid,
|
||||
},
|
||||
data: {
|
||||
metadata,
|
||||
metadata: { ...(typeof booking.metadata === "object" && booking.metadata), ...metadata },
|
||||
references: {
|
||||
createMany: {
|
||||
data: referencesToCreate,
|
||||
|
|
Loading…
Reference in New Issue