discourse/app/assets/javascripts/admin/addon/controllers/modals/admin-theme-change.js
David Taylor c190994046
DEV: Update admin modal controllers to native class syntax (#20685)
This commit was generated using the ember-native-class-codemod along with a handful of manual updates
2023-03-15 17:39:33 +00:00

18 lines
501 B
JavaScript

import Controller from "@ember/controller";
import ModalFunctionality from "discourse/mixins/modal-functionality";
import { ajax } from "discourse/lib/ajax";
export default class AdminThemeChangeController extends Controller.extend(
ModalFunctionality
) {
loadDiff() {
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);
});
}
}