Remove some `Discourse.Site` constants

This commit is contained in:
Robin Ward 2017-09-11 15:27:14 -04:00
parent cc1a461254
commit 5fd3b6615b
1 changed files with 3 additions and 4 deletions

View File

@ -84,15 +84,14 @@ const Post = RestModel.extend({
}.property('link_counts.@each.internal'),
flagsAvailable: function() {
const post = this;
return Discourse.Site.currentProp('flagTypes').filter(function(item) {
return post.get("actionByName." + item.get('name_key') + ".can_act");
return this.site.get('flagTypes').filter(item => {
return this.get(`actionByName.${item.get('name_key')}.can_act`);
});
}.property('actions_summary.@each.can_act'),
afterUpdate(res) {
if (res.category) {
Discourse.Site.current().updateCategory(res.category);
this.site.updateCategory(res.category);
}
},