REFACTOR: Remove `Discourse.BaseUrl` global
This commit is contained in:
parent
19d057d261
commit
1a2156a0c2
|
@ -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 = [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue