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

15 Zeilen
351 B
JavaScript

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