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 { ajax } from "discourse/lib/ajax";
import { extractError } from "discourse/lib/ajax-error";
@ -66,7 +67,7 @@ Backup.reopenClass({
bootbox.alert(result.message);
} else {
// redirect to homepage (session might be lost)
window.location = Discourse.getURL("/");
window.location = getURL("/");
}
});
}