Skip to content

Commit

Permalink
Filter out cancelled events
Browse files Browse the repository at this point in the history
  • Loading branch information
ashlyn committed Jun 15, 2020
1 parent 5973877 commit a12dcef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/services/calendar/calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export const getEventsForUser = async (email: string, storedToken: Token): Promi
const outlookEvents = await getAuthenticatedClient(email, storedToken)
.api(`/users/${email}/calendarView?startDateTime=${startTime.toISOString()}&endDateTime=${endTime.toISOString()}`)
.select('start,end,subject,body,showAs,location,sensitivity')
.filter('isCancelled eq false')
.get();

return outlookEvents.value.map((e: any) => {
Expand Down

0 comments on commit a12dcef

Please sign in to comment.