Fix a bug in k/v creation.
This commit is contained in:
parent
fb2478705a
commit
c13b7d04e8
|
@ -256,10 +256,10 @@ export async function createOrUpdateSecret(baseMount, secretPath, name, data) {
|
|||
let APIData = {};
|
||||
|
||||
if (pageState.currentMountType == "kv-v2") {
|
||||
secretURL = `/v1/${baseMount}/data/${secretPath.join("")}/${name}`;
|
||||
secretURL = `/v1/${baseMount}/data/${secretPath.join("/")}/${name}`;
|
||||
APIData = { "data": data };
|
||||
} else {
|
||||
secretURL = `/v1/${baseMount}/${secretPath.join("")}/${name}`;
|
||||
secretURL = `/v1/${baseMount}/${secretPath.join("/")}/${name}`;
|
||||
APIData = data;
|
||||
}
|
||||
|
||||
|
|
|
@ -64,10 +64,11 @@ export class KeyValueNewPage extends Page {
|
|||
keyData = { "key": "value" };
|
||||
}
|
||||
|
||||
console.log(splitPath)
|
||||
createOrUpdateSecret(
|
||||
pageState.currentBaseMount,
|
||||
pageState.currentSecretPath,
|
||||
splitPath[splitPath.length - 1],
|
||||
path,
|
||||
keyData
|
||||
).then(_ => {
|
||||
changePage("KEY_VALUE_VIEW");
|
||||
|
|
Loading…
Reference in a new issue