mirror of
https://github.com/urosran/cally.git
synced 2025-11-26 00:24:53 +00:00
- Added proper oauth2 authentication with google and saving of the access token to the profile
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
export async function fetchGoogleCalendarEvents(token, 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}`,
|
||||
{
|
||||
@ -9,6 +10,7 @@ export async function fetchGoogleCalendarEvents(token, startDate, endDate) {
|
||||
);
|
||||
|
||||
const data = await response.json();
|
||||
console.log(data);
|
||||
const googleEvents = [];
|
||||
data.items?.forEach((item) => {
|
||||
let isAllDay = false;
|
||||
|
||||
Reference in New Issue
Block a user