- Prepared methods for microsoft authorization and added a button to handle microsoft auth

- Saved the microsoft token to the profile of the current user
This commit is contained in:
Dejan
2024-10-05 16:17:55 +02:00
parent d4b5ebcb80
commit b5a8712af8
4 changed files with 89 additions and 30 deletions

View File

@ -1,6 +1,6 @@
export async function fetchGoogleCalendarEvents(token, startDate) {
export async function fetchGoogleCalendarEvents(token, startDate, endDate) {
const response = await fetch(
`https://www.googleapis.com/calendar/v3/calendars/primary/events?single_events=true&time_min=${startDate}`,
`https://www.googleapis.com/calendar/v3/calendars/primary/events?single_events=true&time_min=${startDate}&time_max=${endDate}`,
{
headers: {
Authorization: `Bearer ${token}`,