From 0c1a9aa4bca29e5f6561283a3d172dc8401e6015 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 6 Jul 2020 15:25:19 -0400 Subject: [PATCH] FIX: deprecations --- assets/javascripts/discourse/components/query-result.js.es6 | 3 ++- assets/javascripts/discourse/models/query.js.es6 | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/javascripts/discourse/components/query-result.js.es6 b/assets/javascripts/discourse/components/query-result.js.es6 index 51dab5d..dc8d42f 100644 --- a/assets/javascripts/discourse/components/query-result.js.es6 +++ b/assets/javascripts/discourse/components/query-result.js.es6 @@ -1,4 +1,5 @@ import { ajax } from "discourse/lib/ajax"; +import getURL from "discourse-common/lib/get-url"; import Badge from "discourse/models/badge"; import { default as computed } from "discourse-common/utils/decorators"; @@ -177,7 +178,7 @@ const QueryResultComponent = Ember.Component.extend({ form.setAttribute("method", "post"); form.setAttribute( "action", - Discourse.getURL( + getURL( this.download_url() + this.get("query.id") + "/run." + diff --git a/assets/javascripts/discourse/models/query.js.es6 b/assets/javascripts/discourse/models/query.js.es6 index ae5db8c..6426dea 100644 --- a/assets/javascripts/discourse/models/query.js.es6 +++ b/assets/javascripts/discourse/models/query.js.es6 @@ -3,6 +3,7 @@ import { on, observes } from "discourse-common/utils/decorators"; +import getURL from "discourse-common/lib/get-url"; import RestModel from "discourse/models/rest"; const Query = RestModel.extend({ @@ -56,9 +57,7 @@ const Query = RestModel.extend({ @computed("id") downloadUrl(id) { // TODO - can we change this to use the store/adapter? - return Discourse.getURL( - `/admin/plugins/explorer/queries/${id}.json?export=1` - ); + return getURL(`/admin/plugins/explorer/queries/${id}.json?export=1`); }, createProperties() {