1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/discourse/routes/admin-wizards-submissions.js.es6
2018-02-04 17:31:26 +08:00

17 Zeilen
424 B
JavaScript

import CustomWizard from '../models/custom-wizard';
export default Discourse.Route.extend({
model() {
return CustomWizard.all();
},
afterModel(model, transition) {
if (transition.intent.name !== 'adminWizardSubmissions' && model[0] && model[0].id) {
this.transitionTo('adminWizardSubmissions', model[0].id);
}
},
setupController(controller, model){
controller.set("model", model);
}
});