open-vault/ui/app/routes/vault/cluster/access/method/section.js

21 lines
552 B
JavaScript
Raw Normal View History

2018-04-03 14:16:57 +00:00
import Ember from 'ember';
import DS from 'ember-data';
export default Ember.Route.extend({
model(params) {
const { section_name: section } = params;
if (section !== 'configuration') {
const error = new DS.AdapterError();
Ember.set(error, 'httpStatus', 404);
throw error;
}
return this.modelFor('vault.cluster.access.method');
},
setupController(controller) {
const { section_name: section } = this.paramsFor(this.routeName);
this._super(...arguments);
controller.set('section', section);
},
});