fix: use calendar-scoped Graph API endpoint for Outlook event update/delete

Events fetched via /calendarView must be addressed via
/me/calendars/{calendarId}/events/{eventId}, not /me/events/{eventId}.
The latter returns ErrorItemNotFound for calendar-view instance IDs.

v1.62.1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
mARTin 2026-03-23 23:37:40 +01:00
parent 57eeb3d8e8
commit c00f691f1f
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "my-weekly-todo-list",
"version": "1.62.0",
"version": "1.62.1",
"description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view",
"main": "index.js",
"scripts": {

View File

@ -324,7 +324,7 @@ export const updateEvent = async (
eventId: string,
event: any
) => {
const response = await fetch(`${GRAPH_ENDPOINT}/me/events/${encodeURIComponent(eventId)}`, {
const response = await fetch(`${GRAPH_ENDPOINT}/me/calendars/${encodeURIComponent(calendarId)}/events/${encodeURIComponent(eventId)}`, {
method: 'PATCH',
headers: {
'Authorization': `Bearer ${accessToken}`,
@ -387,7 +387,7 @@ export const deleteEvent = async (
calendarId: string,
eventId: string
) => {
const response = await fetch(`${GRAPH_ENDPOINT}/me/events/${encodeURIComponent(eventId)}`, {
const response = await fetch(`${GRAPH_ENDPOINT}/me/calendars/${encodeURIComponent(calendarId)}/events/${encodeURIComponent(eventId)}`, {
method: 'DELETE',
headers: {
'Authorization': `Bearer ${accessToken}`