fix: Allow to read calendars ended with google.com
This commit is contained in:
parent
5f101ca5fc
commit
91d71d61ae
1 changed files with 1 additions and 4 deletions
|
@ -142,14 +142,11 @@ const GoogleCalendar = (credential) => {
|
||||||
calendar.calendarList
|
calendar.calendarList
|
||||||
.list()
|
.list()
|
||||||
.then(cals => {
|
.then(cals => {
|
||||||
const items = cals.data.items.filter(
|
|
||||||
item => !/calendar.google.com/.test(item.id)
|
|
||||||
);
|
|
||||||
calendar.freebusy.query({
|
calendar.freebusy.query({
|
||||||
requestBody: {
|
requestBody: {
|
||||||
timeMin: dateFrom,
|
timeMin: dateFrom,
|
||||||
timeMax: dateTo,
|
timeMax: dateTo,
|
||||||
items: items
|
items: cals.data.items
|
||||||
}
|
}
|
||||||
}, (err, apires) => {
|
}, (err, apires) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
Loading…
Reference in a new issue