Skip to content

Commit

Permalink
[Arvion] Security fix: upgrade package to new version
Browse files Browse the repository at this point in the history
  • Loading branch information
arvion-agent committed Jan 21, 2025
1 parent a6076a1 commit e8bc72b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions graph-tutorial/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"@microsoft/mgt-element": "^3.1.3",
"@microsoft/microsoft-graph-client": "^3.0.7",
"bootstrap": "^5.3.3",
"date-fns": "^2.29.2",
"date-fns-tz": "^2.0.1",
"date-fns": "4.1.0",
"date-fns-tz": "3.2.0",
"react": "^18.3.1",
"react-bootstrap": "^2.10.4",
"react-dom": "^18.3.1",
Expand Down
6 changes: 3 additions & 3 deletions graph-tutorial/src/GraphService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import { Client, GraphRequestOptions, PageCollection, PageIterator } from '@microsoft/microsoft-graph-client';
import { AuthCodeMSALBrowserAuthenticationProvider } from '@microsoft/microsoft-graph-client/authProviders/authCodeMsalBrowser';
import { endOfWeek, startOfWeek } from 'date-fns';
import { zonedTimeToUtc } from 'date-fns-tz';
import { fromZonedTime } from 'date-fns-tz';
import { User, Event } from '@microsoft/microsoft-graph-types';

let graphClient: Client | undefined = undefined;
Expand Down Expand Up @@ -41,8 +41,8 @@ export async function getUserWeekCalendar(authProvider: AuthCodeMSALBrowserAuthe
// Generate startDateTime and endDateTime query params
// to display a 7-day window
const now = new Date();
const startDateTime = zonedTimeToUtc(startOfWeek(now), timeZone).toISOString();
const endDateTime = zonedTimeToUtc(endOfWeek(now), timeZone).toISOString();
const startDateTime = fromZonedTime(startOfWeek(now), timeZone).toISOString();
const endDateTime = fromZonedTime(endOfWeek(now), timeZone).toISOString();

// GET /me/calendarview?startDateTime=''&endDateTime=''
// &$select=subject,organizer,start,end
Expand Down

0 comments on commit e8bc72b

Please sign in to comment.