0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-24 02:10:29 +01:00
discourse-custom-wizard/assets/javascripts/discourse/routes/admin-wizards-logs-show.js
Angus McLeod ce55b4671e Linting
2024-11-22 17:11:51 +01:00

26 Zeilen
618 B
JavaScript

import { A } from "@ember/array";
import { service } from "@ember/service";
import DiscourseRoute from "discourse/routes/discourse";
import CustomWizardLogs from "../models/custom-wizard-logs";
export default DiscourseRoute.extend({
router: service(),
model(params) {
return CustomWizardLogs.list(params.wizardId);
},
afterModel(model) {
if (model === null) {
return this.router.transitionTo("adminWizardsLogs");
}
},
setupController(controller, model) {
controller.setProperties({
wizard: model.wizard,
logs: A(model.logs),
total: model.total,
});
},
});