mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 00:17:23 +08:00
22 lines
538 B
JavaScript
22 lines
538 B
JavaScript
import ModalFunctionality from 'discourse/mixins/modal-functionality';
|
|
|
|
export default Ember.Controller.extend(ModalFunctionality, {
|
|
removeAfter: null,
|
|
deleteSpammer: null,
|
|
|
|
actions: {
|
|
agreeDeleteSpammer(user) {
|
|
return this.removeAfter(user.deleteAsSpammer()).then(() => {
|
|
this.send('closeModal');
|
|
});
|
|
},
|
|
|
|
perform(action) {
|
|
let flaggedPost = this.get('model');
|
|
return this.removeAfter(flaggedPost.agreeFlags(action)).then(() => {
|
|
this.send('closeModal');
|
|
});
|
|
},
|
|
}
|
|
});
|