1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/discourse/routes/admin-wizards-logs.js.es6
2021-09-09 14:07:12 +08:00

24 Zeilen
611 B
JavaScript

import DiscourseRoute from "discourse/routes/discourse";
import { ajax } from "discourse/lib/ajax";
export default DiscourseRoute.extend({
model() {
return ajax(`/admin/wizards/wizard`);
},
setupController(controller, model) {
const showParams = this.paramsFor("adminWizardsLogsShow");
controller.setProperties({
wizardId: showParams.wizardId,
wizardList: model.wizard_list,
});
},
actions: {
changeWizard(wizardId) {
this.controllerFor("adminWizardsLogs").set("wizardId", wizardId);
this.transitionTo("adminWizardsLogsShow", wizardId);
},
},
});