open-vault/ui/app/routes/vault/cluster/secrets/backend/create.js
Matthew Irish 458c59490f
ui kv routing fix (#5650)
* fix passing initialKey to the top level secret create page

* add service that uses the private routing service because of various bugs

* make custom router service more like the bundled router service

* clear the store cache when the model changes
2018-11-02 12:03:46 -05:00

12 lines
323 B
JavaScript

import Route from '@ember/routing/route';
export default Route.extend({
beforeModel() {
let { secret, initialKey } = this.paramsFor(this.routeName);
let qp = initialKey || secret;
return this.transitionTo('vault.cluster.secrets.backend.create-root', {
queryParams: { initialKey: qp },
});
},
});