1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/discourse/routes/admin-wizards-api.js.es6
Angus McLeod f331f80cbb Update wizard api CRUD
- New api metadata model
- New api id system
- Minor UI updates
2019-06-02 20:54:31 +10:00

21 Zeilen
432 B
JavaScript

import CustomWizardApi from '../models/custom-wizard-api';
export default Discourse.Route.extend({
queryParams: {
refresh_list: {
refreshModel: true
}
},
model(params) {
if (params.name === 'new') {
return CustomWizardApi.create({ isNew: true });
} else {
return CustomWizardApi.find(params.name);
}
},
setupController(controller, model){
controller.set("api", model);
}
});