fixed cal downloads
This commit is contained in:
@@ -40,7 +40,7 @@ async def fetch_calendar_events(
|
||||
calendar_url = (
|
||||
f"https://graph.microsoft.com/v1.0/me/calendarView?"
|
||||
f"startDateTime={start_date_str}&endDateTime={end_date_str}&"
|
||||
f"$select=id,subject,organizer,start,end,location,isAllDay,showAs,sensitivity"
|
||||
f"$select=id,subject,organizer,start,end,location,isAllDay,showAs,sensitivity&$count=true"
|
||||
)
|
||||
|
||||
events = []
|
||||
@@ -57,4 +57,5 @@ async def fetch_calendar_events(
|
||||
next_link = response_data.get("@odata.nextLink")
|
||||
|
||||
# Return events and total count
|
||||
return events, len(events)
|
||||
total_count = response_data.get("@odata.count", len(events))
|
||||
return events, total_count
|
||||
|
||||
Reference in New Issue
Block a user