discourse/app/assets/javascripts/admin/controllers/modals/admin-moderation-history.js.es6

22 lines
484 B
Plaintext
Raw Normal View History

2018-06-15 23:03:24 +08:00
import ModalFunctionality from "discourse/mixins/modal-functionality";
export default Ember.Controller.extend(ModalFunctionality, {
loading: null,
historyTarget: null,
history: null,
onShow() {
2018-06-15 23:03:24 +08:00
this.set("loading", true);
this.set("history", null);
},
loadHistory(target) {
2018-06-15 23:03:24 +08:00
this.store
.findAll("moderation-history", target)
.then(result => {
this.set("history", result);
})
.finally(() => this.set("loading", false));
}
});