hotfix: missing gCal calendarId (#11139)

Co-authored-by: zomars <[email protected]>
This commit is contained in:
alannncandzomars authored and GitHub committed 2023-09-04 20:25:39 +00:00
1 parent 0150041496
commit 8891641953
1 file changed
+4 -4
@@ -144,14 +144,14 @@ export default class GoogleCalendarService implements Calendar {
});
// Find in calEventRaw.destinationCalendar the one with the same credentialId
const selectedCalendar = calEventRaw.destinationCalendar?.find(
(cal) => cal.credentialId === credentialId
)?.externalId;
const selectedCalendar =
calEventRaw.destinationCalendar?.find((cal) => cal.credentialId === credentialId)?.externalId ||
"primary";
calendar.events.insert(
{
auth: myGoogleAuth,
calendarId: selectedCalendar || "primary",
calendarId: selectedCalendar,
requestBody: payload,
conferenceDataVersion: 1,
sendUpdates: "none",