open-vault/ui/app/services/secret-mount-path.js
Hamid Ghaf 27bb03bbc0
adding copyright header (#19555)
* adding copyright header

* fix fmt and a test
2023-03-15 09:00:52 -07:00

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