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 = {};
|
let APIData = {};
|
||||||
|
|
||||||
if (pageState.currentMountType == "kv-v2") {
|
if (pageState.currentMountType == "kv-v2") {
|
||||||
secretURL = `/v1/${baseMount}/data/${secretPath.join("")}/${name}`;
|
secretURL = `/v1/${baseMount}/data/${secretPath.join("/")}/${name}`;
|
||||||
APIData = { "data": data };
|
APIData = { "data": data };
|
||||||
} else {
|
} else {
|
||||||
secretURL = `/v1/${baseMount}/${secretPath.join("")}/${name}`;
|
secretURL = `/v1/${baseMount}/${secretPath.join("/")}/${name}`;
|
||||||
APIData = data;
|
APIData = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,10 +64,11 @@ export class KeyValueNewPage extends Page {
|
||||||
keyData = { "key": "value" };
|
keyData = { "key": "value" };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(splitPath)
|
||||||
createOrUpdateSecret(
|
createOrUpdateSecret(
|
||||||
pageState.currentBaseMount,
|
pageState.currentBaseMount,
|
||||||
pageState.currentSecretPath,
|
pageState.currentSecretPath,
|
||||||
splitPath[splitPath.length - 1],
|
path,
|
||||||
keyData
|
keyData
|
||||||
).then(_ => {
|
).then(_ => {
|
||||||
changePage("KEY_VALUE_VIEW");
|
changePage("KEY_VALUE_VIEW");
|
||||||
|
|
Loading…
Reference in a new issue