REFACTOR: Remove `Discourse.BaseUrl` global

This commit is contained in:
Robin Ward 2020-08-17 16:08:40 -04:00
parent 19d057d261
commit 1a2156a0c2
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
import DiscourseRoute from "discourse/routes/discourse"; import DiscourseRoute from "discourse/routes/discourse";
import Invite from "discourse/models/invite"; import Invite from "discourse/models/invite";
import showModal from "discourse/lib/show-modal"; import showModal from "discourse/lib/show-modal";
import { getAbsoluteURL } from "discourse-common/lib/get-url";
export default DiscourseRoute.extend({ export default DiscourseRoute.extend({
model(params) { model(params) {
@ -59,7 +60,7 @@ export default DiscourseRoute.extend({
}, },
editInvite(inviteKey) { editInvite(inviteKey) {
const inviteLink = `${Discourse.BaseUrl}/invites/${inviteKey}`; const inviteLink = getAbsoluteURL(`/invites/${inviteKey}`);
this.currentUser.setProperties({ finished: true, inviteLink }); this.currentUser.setProperties({ finished: true, inviteLink });
const panels = [ const panels = [
{ {