Skip to content

Scheduling infrastructure for absolutely everyone.

change event for outlook implemented

nicolas403823fc62fc
diff --git a/lib/calendarClient.ts b/lib/calendarClient.ts
index bf8ddf582dc..b19c51662eb 100644
--- a/lib/calendarClient.ts
+++ b/lib/calendarClient.ts
@@ -164,9 +164,14 @@ const MicrosoftOffice365Calendar = (credential): CalendarApiAdapter => {
'Authorization': 'Bearer ' + accessToken
}
}).then(handleErrorsRaw)),
- updateEvent: (uid: String, event: CalendarEvent) => {
- //TODO Implement
- },
+ updateEvent: (uid: String, event: CalendarEvent) => auth.getToken().then(accessToken => fetch('https://graph.microsoft.com/v1.0/me/calendar/events/' + uid, {
+ method: 'PATCH',
+ headers: {
+ 'Authorization': 'Bearer ' + accessToken,
+ 'Content-Type': 'application/json'
+ },
+ body: JSON.stringify(translateEvent(event))
+ }).then(handleErrorsRaw)),
}
};