From f4efef7f8d708af31cec568a9bcad500679abfa3 Mon Sep 17 00:00:00 2001 From: Kravets <57632712+kravetsone@users.noreply.github.com> Date: Thu, 28 Nov 2024 19:54:36 +0300 Subject: [PATCH 1/2] add missed , at js object --- docs/docs/caldav/createCalendarObject.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/caldav/createCalendarObject.md b/docs/docs/caldav/createCalendarObject.md index fce990d..3de4a86 100644 --- a/docs/docs/caldav/createCalendarObject.md +++ b/docs/docs/caldav/createCalendarObject.md @@ -9,7 +9,7 @@ create one calendar object on the target calendar ```ts const result = await createCalendarObject({ calendar: calendars[0], - filename: 'test.ics' + filename: 'test.ics', iCalString: 'BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//ZContent.net//Zap Calendar 1.0//EN\nBEGIN:VEVENT\nCALSCALE:GREGORIAN\nMETHOD:PUBLISH\nSUMMARY:Abraham Lincoln\nUID:c7614cff-3549-4a00-9152-d25cc1fe077d\nSEQUENCE:0\nSTATUS:CONFIRMED\nTRANSP:TRANSPARENT\nRRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=2;BYMONTHDAY=12\nDTSTART:20080212T182145Z\nDTEND:20080213T182145Z\nDTSTAMP:20150421T182145Z\nCATEGORIES:U.S. Presidents,Civil War People\nLOCATION:Hodgenville, Kentucky\nGEO:37.5739497;-85.7399606\nDESCRIPTION:Born February 12, 1809 Sixteenth President (1861-1865) http\://AmericanHistoryCalendar.com\nURL:http\://americanhistorycalendar.com/peoplecalendar/1,328-abraham-lincoln\nEND:VEVENT\nEND:VCALENDAR', headers: { authorization: 'Basic x0C9ueWd9Vz8OwS0DEAtkAlj', From 32fd7a4a37a512a1c55cdac73af5fd4317374461 Mon Sep 17 00:00:00 2001 From: Kravets <57632712+kravetsone@users.noreply.github.com> Date: Thu, 28 Nov 2024 20:08:27 +0300 Subject: [PATCH 2/2] avoid useless Promise.all at smart calendar sync example --- docs/docs/smart calendar sync.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/docs/smart calendar sync.md b/docs/docs/smart calendar sync.md index 7822f0c..bf5a6f3 100644 --- a/docs/docs/smart calendar sync.md +++ b/docs/docs/smart calendar sync.md @@ -131,13 +131,12 @@ you can use `syncCalendars` function from the lib with `detailedResult` set as ` ```ts const { created, updated, deleted } = await client.syncCalendars({ - oldCalendars: await Promise.all( - localCalendars.map(async (lc) => ({ + oldCalendars: localCalendars.map((lc) => ({ displayName: lc.name, syncToken: lc.syncToken, ctag: lc.ctag, url: lc.url, - })) + }) ), detailedResult: true, });