2017-10-05 02:36:46 +02:00
|
|
|
import CustomWizard from '../models/custom-wizard';
|
|
|
|
|
|
|
|
export default Discourse.Route.extend({
|
|
|
|
model() {
|
2017-10-22 05:37:58 +02:00
|
|
|
return CustomWizard.all();
|
2017-10-05 02:36:46 +02:00
|
|
|
},
|
|
|
|
|
2017-10-06 04:59:02 +02:00
|
|
|
afterModel(model, transition) {
|
|
|
|
if (transition.intent.name !== 'adminWizardSubmissions' && model.length > 0) {
|
|
|
|
this.transitionTo('adminWizardSubmissions', model[0].id);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2017-10-05 02:36:46 +02:00
|
|
|
setupController(controller, model){
|
|
|
|
controller.set("model", model);
|
|
|
|
}
|
|
|
|
});
|