Syncing improvement

This commit is contained in:
Milan Paunovic
2024-10-19 19:55:46 +02:00
parent 043b80baa9
commit 00b6225a1c
5 changed files with 80 additions and 63 deletions

View File

@ -1,4 +1,4 @@
export async function fetchGoogleCalendarEvents(token, startDate, endDate) {
export async function fetchGoogleCalendarEvents(token, email, startDate, endDate) {
console.log(token);
const response = await fetch(
`https://www.googleapis.com/calendar/v3/calendars/primary/events?single_events=true&time_min=${startDate}&time_max=${endDate}`,
@ -45,6 +45,7 @@ export async function fetchGoogleCalendarEvents(token, startDate, endDate) {
startDate: startDateTime,
endDate: endDateTime,
allDay: isAllDay,
email
};
googleEvents.push(googleEvent);
});