DEV: Move Discourse.getURL and related functions to a module (#9966)

* DEV: Move `Discourse.getURL` and related functions to a module

* DEV: Remove `Discourse.getURL` and `Discourse.getURLWithCDN`

* FIX: `get-url` is required for server side code

* DEV: Deprecate `BaseUri` too.
This commit is contained in:
Robin Ward
2020-06-03 12:45:26 -04:00
committed by GitHub
parent d27b877a40
commit ba00cc8ec4
90 changed files with 401 additions and 260 deletions

View File

@@ -1,3 +1,4 @@
import getURL from "discourse-common/lib/get-url";
import I18n from "I18n";
import EmberObject from "@ember/object";
import DiscourseRoute from "discourse/routes/discourse";
@@ -40,7 +41,7 @@ export default DiscourseRoute.extend({
);
if (log.operation === "restore") {
// redirect to homepage when the restore is done (session might be lost)
window.location = Discourse.getURL("/");
window.location = getURL("/");
}
} else {
this.controllerFor("adminBackupsLogs")