only create event on first calendar integration (#1155)
* only create event on first calendar integration * fix it Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>pull/1165/head^2
parent
bf659c0b16
commit
d4f8030b6b
|
@ -213,10 +213,15 @@ export default class EventManager {
|
|||
* @private
|
||||
*/
|
||||
|
||||
private createAllCalendarEvents(event: CalendarEvent, noMail: boolean | null): Promise<Array<EventResult>> {
|
||||
return async.mapLimit(this.calendarCredentials, 5, async (credential: Credential) => {
|
||||
return createEvent(credential, event, noMail);
|
||||
});
|
||||
private async createAllCalendarEvents(
|
||||
event: CalendarEvent,
|
||||
noMail: boolean | null
|
||||
): Promise<Array<EventResult>> {
|
||||
const [firstCalendar] = this.calendarCredentials;
|
||||
if (!firstCalendar) {
|
||||
return [];
|
||||
}
|
||||
return [await createEvent(firstCalendar, event, noMail)];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue