1
0
Fork 0

Fix a bug in k/v creation.

This commit is contained in:
Kitteh 2021-05-05 17:09:38 +01:00
parent fb2478705a
commit c13b7d04e8
2 changed files with 4 additions and 3 deletions

View file

@ -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;
} }

View file

@ -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");