You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code uses the form fields to create a Graph event object, then sends a POST request to the `/me/events` endpoint to create the event on the user's default calendar.
24
+
25
+
1. Add the following code to the **./routes/calendar.js** file before the `module.exports = router;` line.
This code validates and sanitized the form input, then calls `graph.createEvent` to create the event. It redirects back to the calendar view after the call completes.
30
+
31
+
1. Save your changes and restart the app. Click the **Calendar** nav item, then click the **Create event** button. Fill in the values and click **Create**. The app returns to the calendar view once the new event is created.
32
+
33
+

0 commit comments