FIX: deprecations

This commit is contained in:
Robin Ward 2020-07-06 15:25:19 -04:00
parent fc041d8b4a
commit 0c1a9aa4bc
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,5 @@
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import getURL from "discourse-common/lib/get-url";
import Badge from "discourse/models/badge"; import Badge from "discourse/models/badge";
import { default as computed } from "discourse-common/utils/decorators"; import { default as computed } from "discourse-common/utils/decorators";
@ -177,7 +178,7 @@ const QueryResultComponent = Ember.Component.extend({
form.setAttribute("method", "post"); form.setAttribute("method", "post");
form.setAttribute( form.setAttribute(
"action", "action",
Discourse.getURL( getURL(
this.download_url() + this.download_url() +
this.get("query.id") + this.get("query.id") +
"/run." + "/run." +

View File

@ -3,6 +3,7 @@ import {
on, on,
observes observes
} from "discourse-common/utils/decorators"; } from "discourse-common/utils/decorators";
import getURL from "discourse-common/lib/get-url";
import RestModel from "discourse/models/rest"; import RestModel from "discourse/models/rest";
const Query = RestModel.extend({ const Query = RestModel.extend({
@ -56,9 +57,7 @@ const Query = RestModel.extend({
@computed("id") @computed("id")
downloadUrl(id) { downloadUrl(id) {
// TODO - can we change this to use the store/adapter? // TODO - can we change this to use the store/adapter?
return Discourse.getURL( return getURL(`/admin/plugins/explorer/queries/${id}.json?export=1`);
`/admin/plugins/explorer/queries/${id}.json?export=1`
);
}, },
createProperties() { createProperties() {