mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-19 05:31:10 +02:00
26 lines
608 B
JavaScript
26 lines
608 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*/
|
|
|
|
import { encodePath } from 'vault/utils/path-encoding-helpers';
|
|
import ApplicationAdapter from '../application';
|
|
|
|
export default class PkiUrlsAdapter extends ApplicationAdapter {
|
|
namespace = 'v1';
|
|
|
|
_url(backend) {
|
|
return `${this.buildURL()}/${encodePath(backend)}/config/urls`;
|
|
}
|
|
|
|
urlForCreateRecord(modelName, snapshot) {
|
|
return this._url(snapshot.record.id);
|
|
}
|
|
urlForFindRecord(id) {
|
|
return this._url(id);
|
|
}
|
|
urlForUpdateRecord(store, type, snapshot) {
|
|
return this._url(snapshot.record.id);
|
|
}
|
|
}
|