mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-20 06:01:10 +02:00
* add config directory, rename crl and urls models * fix imports * add cluster config fields to edit form * reorder url save * update tests * add to details page * add details test; * fix adapter name * fix cluster adapter test name * combine adapter tests * update imports * fix git diff * move crl and urls adapters to config folder * add config file * woops add config adapter * final renaming!! * fix imports after naming to base * add cluster to beforeModel hook * hide help text * maybe you should write tests that actually pass, claire * seriously claire its embarrassing
22 lines
518 B
JavaScript
22 lines
518 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*/
|
|
|
|
import ApplicationAdapter from '../../application';
|
|
|
|
export default class PkiConfigBaseAdapter extends ApplicationAdapter {
|
|
namespace = 'v1';
|
|
|
|
findRecord(store, type, backend) {
|
|
return this.ajax(this._url(backend), 'GET').then((resp) => {
|
|
return resp.data;
|
|
});
|
|
}
|
|
|
|
updateRecord(store, type, snapshot) {
|
|
const data = snapshot.serialize();
|
|
return this.ajax(this._url(snapshot.record.id), 'POST', { data });
|
|
}
|
|
}
|