open-vault/ui/lib/kmip/addon/routes/scopes/create.js
Jordan Reimer 52fe56ec87
Eslint prefer-const (#17864)
* adds prefer-const to eslint config and runs fixer

* reverts unintended change
2022-11-09 15:15:31 -08:00

17 lines
392 B
JavaScript

import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
export default Route.extend({
store: service(),
secretMountPath: service(),
beforeModel() {
this.store.unloadAll('kmip/scope');
},
model() {
const model = this.store.createRecord('kmip/scope', {
backend: this.secretMountPath.currentPath,
});
return model;
},
});