open-vault/ui/app/services/secret-mount-path.js

20 lines
452 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Service from '@ember/service';
// this service tracks the path of the currently viewed secret mount
// so that we can access that inside of engines where parent route params
// are not accessible
export default class SecretMountPath extends Service {
currentPath = '';
update(path) {
this.currentPath = path;
}
get() {
return this.currentPath;
}
}