This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/admin/controllers/modals/admin-flags-received.js.es6

18 lines
383 B
JavaScript

export default Ember.Controller.extend({
loadingFlags: null,
user: null,
onShow() {
this.set('loadingFlags', true);
this.store.findAll('flagged-post', {
filter: 'without_custom',
user_id: this.get('model.id')
}).then(result => {
this.set('loadingFlags', false);
console.log(result);
this.set('flaggedPosts', result);
});
}
});