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,
|
location: evt.location,
|
||||||
eventType: eventTypeRel,
|
eventType: eventTypeRel,
|
||||||
smsReminderNumber: reqBody.smsReminderNumber,
|
smsReminderNumber: reqBody.smsReminderNumber,
|
||||||
|
metadata: reqBody.metadata,
|
||||||
attendees: {
|
attendees: {
|
||||||
createMany: {
|
createMany: {
|
||||||
data: evt.attendees.map((attendee) => {
|
data: evt.attendees.map((attendee) => {
|
||||||
|
@ -1140,7 +1141,7 @@ async function handler(req: NextApiRequest & { userId?: number | undefined }) {
|
||||||
uid: booking.uid,
|
uid: booking.uid,
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
metadata,
|
metadata: { ...(typeof booking.metadata === "object" && booking.metadata), ...metadata },
|
||||||
references: {
|
references: {
|
||||||
createMany: {
|
createMany: {
|
||||||
data: referencesToCreate,
|
data: referencesToCreate,
|
||||||
|
|
Loading…
Reference in New Issue