parent
0150041496
commit
8891641953
|
@ -144,14 +144,14 @@ export default class GoogleCalendarService implements Calendar {
|
||||||
});
|
});
|
||||||
// Find in calEventRaw.destinationCalendar the one with the same credentialId
|
// Find in calEventRaw.destinationCalendar the one with the same credentialId
|
||||||
|
|
||||||
const selectedCalendar = calEventRaw.destinationCalendar?.find(
|
const selectedCalendar =
|
||||||
(cal) => cal.credentialId === credentialId
|
calEventRaw.destinationCalendar?.find((cal) => cal.credentialId === credentialId)?.externalId ||
|
||||||
)?.externalId;
|
"primary";
|
||||||
|
|
||||||
calendar.events.insert(
|
calendar.events.insert(
|
||||||
{
|
{
|
||||||
auth: myGoogleAuth,
|
auth: myGoogleAuth,
|
||||||
calendarId: selectedCalendar || "primary",
|
calendarId: selectedCalendar,
|
||||||
requestBody: payload,
|
requestBody: payload,
|
||||||
conferenceDataVersion: 1,
|
conferenceDataVersion: 1,
|
||||||
sendUpdates: "none",
|
sendUpdates: "none",
|
||||||
|
|
Loading…
Reference in New Issue