sr-npm 1.7.272 → 1.7.273

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.
@@ -44,7 +44,7 @@ async function fetchPositionsFromSRAPI() {
44
44
  page++;
45
45
 
46
46
  // Build the API path - first request has no page parameter, subsequent use nextPageId
47
- let apiPath = `/v1/companies/${companyId.value}/postings?offset=${offset}`;
47
+ const apiPath = `/v1/companies/${companyId.value}/postings?offset=${offset}`;
48
48
 
49
49
  console.log(`Fetching page ${page} with path: ${apiPath}`);
50
50
  const response = await makeSmartRecruitersRequest(apiPath,token);
@@ -1,29 +1,20 @@
1
1
  const { secrets } = require("@wix/secrets");
2
2
  const { auth } = require('@wix/essentials');
3
3
 
4
+ const getSecretValue = auth.elevate(secrets.getSecretValue);
4
5
 
5
6
  function getSmartToken() {
6
- const elevatedGetSecretValue = auth.elevate(secrets.getSecretValue);
7
- return elevatedGetSecretValue("x-smarttoken")
7
+ return getSecretValue("x-smarttoken")
8
8
  .then((secret) => {
9
9
  return secret;
10
10
  })
11
- .catch((error) => {
12
- console.error(error);
13
- throw error;
14
- });
15
11
  }
16
12
 
17
13
  function getCompanyId() {
18
- const elevatedGetSecretValue = auth.elevate(secrets.getSecretValue);
19
- return elevatedGetSecretValue("companyID")
14
+ return getSecretValue("companyID")
20
15
  .then((secret) => {
21
16
  return secret;
22
17
  })
23
- .catch((error) => {
24
- console.error(error);
25
- throw error;
26
- });
27
18
  }
28
19
  module.exports = {
29
20
  getSmartToken,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.272",
3
+ "version": "1.7.273",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {