Skip to content

Commit 558d015

Browse files
committed
fix: public url under admin groups list
1 parent 8f6399b commit 558d015

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

app/models/group.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@ import { computed } from '@ember/object';
55
import { inject as service } from '@ember/service';
66

77
export default class Group extends ModelBase.extend({
8-
98
router : service(),
109
fastboot : service(),
1110

12-
1311
name : attr('string'),
1412
about : attr('string'),
1513
logoUrl : attr('string'),
@@ -29,8 +27,9 @@ export default class Group extends ModelBase.extend({
2927
followers : hasMany('user-follow-group'),
3028

3129
url: computed('identifier', function() {
32-
const origin = this.fastboot.isFastBoot ? `${this.fastboot.request.protocol}//${this.fastboot.request.host}` : location.origin;
33-
return origin + this.router.urlFor('groups.edit.events', this.id);
30+
const origin = this.fastboot.isFastBoot
31+
? `${this.fastboot.request.protocol}//${this.fastboot.request.host}`
32+
: location.origin;
33+
return origin + `/g/${this.id}`;
3434
})
3535
}) {}
36-

0 commit comments

Comments
 (0)