2019-10-24 01:06:54 +08:00
|
|
|
import Controller from "@ember/controller";
|
2018-06-15 23:03:24 +08:00
|
|
|
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
|
|
|
import { ajax } from "discourse/lib/ajax";
|
2017-04-12 22:52:52 +08:00
|
|
|
|
2019-10-24 01:06:54 +08:00
|
|
|
export default Controller.extend(ModalFunctionality, {
|
2017-04-12 22:52:52 +08:00
|
|
|
loadDiff() {
|
2018-06-15 23:03:24 +08:00
|
|
|
this.set("loading", true);
|
|
|
|
ajax(
|
|
|
|
"/admin/logs/staff_action_logs/" + this.get("model.id") + "/diff"
|
|
|
|
).then(diff => {
|
|
|
|
this.set("loading", false);
|
|
|
|
this.set("diff", diff.side_by_side);
|
|
|
|
});
|
2017-04-12 22:52:52 +08:00
|
|
|
}
|
|
|
|
});
|