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

20 lines
452 B
JavaScript
Raw Normal View History

2024-04-20 12:23:50 +00:00
/**
* 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;
}
}