Import getURL to fix deprecation warnings (#47)

Import getURL to fix deprecation warnings (#47)

diff --git a/assets/javascripts/discourse/components/upcoming-events-calendar.js.es6 b/assets/javascripts/discourse/components/upcoming-events-calendar.js.es6
index 1282cbb..3957672 100644
--- a/assets/javascripts/discourse/components/upcoming-events-calendar.js.es6
+++ b/assets/javascripts/discourse/components/upcoming-events-calendar.js.es6
@@ -4,6 +4,7 @@ import { formatEventName } from "discourse/plugins/discourse-calendar/helpers/fo
 import loadScript from "discourse/lib/load-script";
 import Component from "@ember/component";
 import { schedule } from "@ember/runloop";
+import getURL from "discourse-common/lib/get-url";
 
 export default Component.extend({
   tagName: "",
@@ -46,7 +47,7 @@ export default Component.extend({
           start: starts_at,
           end: ends_at || starts_at,
           allDay: !isNotFullDayEvent(moment(starts_at), moment(ends_at)),
-          url: Discourse.getURL(`/t/-/${post.topic.id}/${post.post_number}`)
+          url: getURL(`/t/-/${post.topic.id}/${post.post_number}`)
         });
       });
 
diff --git a/assets/javascripts/discourse/widgets/discourse-post-event.js.es6 b/assets/javascripts/discourse/widgets/discourse-post-event.js.es6
index ec19914..c96e3ff 100644
--- a/assets/javascripts/discourse/widgets/discourse-post-event.js.es6
+++ b/assets/javascripts/discourse/widgets/discourse-post-event.js.es6
@@ -7,6 +7,7 @@ import showModal from "discourse/lib/show-modal";
 import hbs from "discourse/widgets/hbs-compiler";
 import { createWidget } from "discourse/widgets/widget";
 import { routeAction } from "discourse/helpers/route-action";
+import getURL from "discourse-common/lib/get-url";
 
 export default createWidget("discourse-post-event", {
   tagName: "div.discourse-post-event-widget",
@@ -90,7 +91,7 @@ export default createWidget("discourse-post-event", {
   },
 
   addToCalendar() {
-    const link = Discourse.getURL(
+    const link = getURL(
       `/discourse-post-event/events.ics?post_id=${this.state.eventModel.id}`
     );
 

GitHub sha: b66d48ea

This commit appears in #47 which was approved by eviltrout. It was merged by markvanlan.