open-vault/ui/app/routes/vault/cluster/access/method/section.js
2018-04-03 09:16:57 -05:00

21 lines
552 B
JavaScript

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);
},
});