vault/ui/app/models/kmip/scope.js
claire bontempo 9e00094801
ui: fix missing KMIP and Transform apiPath param (#22566)
* add missing api param to scopes

* and add backend param to transform
2023-08-25 16:57:12 +00:00

21 lines
612 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import Model, { attr } from '@ember-data/model';
import { computed } from '@ember/object';
import apiPath from 'vault/utils/api-path';
import { expandAttributeMeta } from 'vault/utils/field-to-attrs';
import lazyCapabilities from 'vault/macros/lazy-capabilities';
export default Model.extend({
name: attr('string'),
backend: attr({ readOnly: true }),
attrs: computed(function () {
return expandAttributeMeta(this, ['name']);
}),
updatePath: lazyCapabilities(apiPath`${'backend'}/scope/${'id'}`, 'backend', 'id'),
});