Remove some `Discourse.Site` constants
This commit is contained in:
parent
cc1a461254
commit
5fd3b6615b
|
@ -84,15 +84,14 @@ const Post = RestModel.extend({
|
||||||
}.property('link_counts.@each.internal'),
|
}.property('link_counts.@each.internal'),
|
||||||
|
|
||||||
flagsAvailable: function() {
|
flagsAvailable: function() {
|
||||||
const post = this;
|
return this.site.get('flagTypes').filter(item => {
|
||||||
return Discourse.Site.currentProp('flagTypes').filter(function(item) {
|
return this.get(`actionByName.${item.get('name_key')}.can_act`);
|
||||||
return post.get("actionByName." + item.get('name_key') + ".can_act");
|
|
||||||
});
|
});
|
||||||
}.property('actions_summary.@each.can_act'),
|
}.property('actions_summary.@each.can_act'),
|
||||||
|
|
||||||
afterUpdate(res) {
|
afterUpdate(res) {
|
||||||
if (res.category) {
|
if (res.category) {
|
||||||
Discourse.Site.current().updateCategory(res.category);
|
this.site.updateCategory(res.category);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue