sr-npm 1.7.460 → 1.7.461
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.
- package/backend/secretsData.js +7 -4
- package/package.json +1 -1
package/backend/secretsData.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const { secrets } = require("@wix/secrets");
|
|
2
2
|
const { auth } = require('@wix/essentials');
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const getSecretValue2 = auth.elevate(secrets.getSecretValue);
|
|
5
5
|
|
|
6
6
|
function getSmartToken() {
|
|
7
|
-
return
|
|
7
|
+
return getSecretValue2("x-smarttoken")
|
|
8
8
|
.then((secret) => {
|
|
9
9
|
return secret;
|
|
10
10
|
})
|
|
@@ -13,14 +13,17 @@ function getSmartToken() {
|
|
|
13
13
|
async function getCompanyId() {
|
|
14
14
|
console.log("auth is : ", auth);
|
|
15
15
|
console.log("secrets is : ", secrets);
|
|
16
|
+
console.log("getSecretValuFSFSDFe is : ");
|
|
16
17
|
const print_me=await secrets.getSecretValue("companyID")
|
|
17
18
|
console.log("print_me is : ", print_me);
|
|
18
|
-
console.log("getSecretValue2 is : ", getSecretValue2);
|
|
19
19
|
console.log("Getting the company ID$#%%$# from the ^$%$^^%secrets");
|
|
20
20
|
return getSecretValue2("companyID")
|
|
21
21
|
.then((secret) => {
|
|
22
22
|
return secret;
|
|
23
|
-
})
|
|
23
|
+
}).catch((error) => {
|
|
24
|
+
console.error("Error getting the company ID from the secrets: ", error);
|
|
25
|
+
throw error;
|
|
26
|
+
});
|
|
24
27
|
}
|
|
25
28
|
module.exports = {
|
|
26
29
|
getCompanyId,
|