change event for outlook implemented

pull/253/head
nicolas 2021-06-09 21:22:34 +02:00
parent e92b2e01fc
commit 403823fc62
1 changed files with 8 additions and 3 deletions

View File

@ -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)),
}
};