contentful-export 7.17.14 → 7.17.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -43,9 +43,11 @@ async function createCachedAssetKey(host, accessToken, spaceId, environmentId, m
|
|
43
43
|
|
44
44
|
try {
|
45
45
|
const assetKeyPromise = createAssetKey(host, accessToken, spaceId, environmentId, expiresAtMs);
|
46
|
+
const resolvedAssetKeyPromise = await assetKeyPromise;
|
47
|
+
const result = await resolvedAssetKeyPromise.json();
|
46
48
|
cacheItem = {
|
47
49
|
expiresAtMs,
|
48
|
-
|
50
|
+
result: result
|
49
51
|
};
|
50
52
|
assetKeyCache.set(cacheKey, cacheItem);
|
51
53
|
} catch (err) {
|
@@ -58,11 +60,9 @@ async function createCachedAssetKey(host, accessToken, spaceId, environmentId, m
|
|
58
60
|
|
59
61
|
return Promise.reject(err);
|
60
62
|
}
|
61
|
-
}
|
62
|
-
|
63
|
+
}
|
63
64
|
|
64
|
-
|
65
|
-
return response.json();
|
65
|
+
return cacheItem.result;
|
66
66
|
}
|
67
67
|
|
68
68
|
function generateSignedToken(secret, urlWithoutQueryParams, expiresAtMs) {
|