Skip to content

Commit 783293a

Browse files
author
Gavin Barron
committed
construction the graph helper
1 parent d220252 commit 783293a

File tree

1 file changed

+2
-1
lines changed
  • ProcessCalendarEventNotification

1 file changed

+2
-1
lines changed

ProcessCalendarEventNotification/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ module.exports = function (context, notification) {
1515

1616
var docDbClient = new DocumentClient(documentDbOptions.host, {masterKey: documentDbOptions.masterKey});
1717
var userRepo = new UserRepository(docDbClient, documentDbOptions.database, documentDbOptions.collection);
18+
var graphHelper = new GraphHelper();
1819
userRepo.init((err) => {
1920
if (err) {
2021
context.done(err);
@@ -37,7 +38,7 @@ module.exports = function (context, notification) {
3738
}
3839
// Get the access token (should use the refresh token to renew this....)
3940
// Get the Calendar event from Microsoft Graph
40-
GraphHelper.getData(`/v1.0/${notification.resource}`, user.data.accessToken, (error, data) => {
41+
graphHelper.getData(`/v1.0/${notification.resource}`, user.data.accessToken, (error, data) => {
4142
if (error) {
4243
context.log(error);
4344
context.done(error);

0 commit comments

Comments
 (0)