sr-npm 1.7.305 → 1.7.306

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.
@@ -16,7 +16,16 @@ function getSmartToken() {
16
16
  return secret;
17
17
  })
18
18
  }
19
+
20
+ function getServerlessAuth() {
21
+ return getSecretValue("serverless_auth")
22
+ .then((secret) => {
23
+ return secret;
24
+ })
25
+ }
26
+
19
27
  module.exports = {
20
28
  getSmartToken,
21
- getCompanyId
29
+ getCompanyId,
30
+ getServerlessAuth
22
31
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.305",
3
+ "version": "1.7.306",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/public/utils.js CHANGED
@@ -1,4 +1,5 @@
1
1
  const { fetch } = require('wix-fetch');
2
+ const { getServerlessAuth } = require('../backend/secretsData');
2
3
 
3
4
  function htmlToText(html) {
4
5
  if (!html) return '';
@@ -33,7 +34,7 @@ async function htmlToRichContent(htmlString) {
33
34
  headers: {
34
35
  "Content-Type": "application/json",
35
36
  "Cookie": "XSRF-TOKEN=1753949844|p--a7HsuVjR4",
36
- "Authorization": "Bearer 2e19efe5f44d29d74480f5b744a5a90f19ba6ca7012ced19e7b14edb1ad6a641"
37
+ "Authorization": "Bearer "+await getServerlessAuth()
37
38
 
38
39
  },
39
40
  body: raw