0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-26 11:00:28 +01:00
discourse-custom-wizard/assets/javascripts/discourse/routes/admin-wizards-api.js.es6

22 Zeilen
432 B
Text

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){
2019-05-31 09:54:11 +02:00
controller.set("api", model);
}
});