Fix wildcard for K/V v2 and Cubbyhole. Add more tests

This commit is contained in:
Lemme 2021-07-27 23:49:58 -04:00
parent 6c9a25ff52
commit a729d0aca1
2 changed files with 27 additions and 1 deletions

View file

@ -41,7 +41,11 @@ async function getSecrets(secretRequests, client) {
if (selector == wildcard) {
body = JSON.parse(body);
const keys = body.data;
let keys = body.data;
if (body.data["data"] != undefined) {
keys = keys.data;
}
for (let key in keys) {
let newRequest = Object.assign({},secretRequest);
newRequest.selector = key;
@ -74,6 +78,9 @@ async function getSecrets(secretRequests, client) {
cachedResponse
});
//DEBUG
//console.log("After", newRequest, value);
// used cachedResponse for first entry in wildcard list and set to true for the rest
cachedResponse = true;
}