Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ async function updateBookingLocationInDb({
evt: Ensure<CalendarEvent, "location">;
references: PartialReference[];
}) {
const isSeatedEvent = !!evt.seatsPerTimeSlot;
const bookingMetadataUpdate = {
videoCallUrl: getVideoCallUrlFromCalEvent(evt),
};
Expand All @@ -97,6 +98,13 @@ async function updateBookingLocationInDb({
...(credentialId && credentialId > 0 ? { credentialId } : {}),
};
});
const responses = {
...(typeof booking.responses === "object" && booking.responses),
location: {
value: evt.location,
optionValue: "",
},
};

const bookingRepository = new BookingRepository(prisma);
await bookingRepository.updateLocationById({
Expand All @@ -108,13 +116,7 @@ async function updateBookingLocationInDb({
...bookingMetadataUpdate,
},
referencesToCreate,
responses: {
...(typeof booking.responses === "object" && booking.responses),
location: {
value: evt.location,
optionValue: "",
},
},
...(!isSeatedEvent ? { responses } : {}),
iCalSequence: (evt.iCalSequence || 0) + 1,
},
});
Expand Down
Loading