sr-npm 1.7.269 → 1.7.270

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.
@@ -3,11 +3,9 @@ const { items: wixData } = require('@wix/data');
3
3
  const { COLLECTIONS } = require('./collectionConsts');
4
4
  const secretsData = require('./secretsData');
5
5
  async function makeSmartRecruitersRequest(path,token) {
6
- const baseUrl = 'https://api.smartrecruiters.com'; // PROD
7
- // const baseUrl = 'https://bayank2.wixstudio.com/my-site-3//_functions'; // TEST
6
+ const baseUrl = 'https://api.smartrecruiters.com';
8
7
  const fullUrl = `${baseUrl}${path}`;
9
8
 
10
- //console.log(`Making request to: ${fullUrl}`);
11
9
  try {
12
10
  const response = await fetch(fullUrl, {
13
11
  method: 'GET',
@@ -63,8 +61,6 @@ async function fetchPositionsFromSRAPI() {
63
61
  console.log(`Total positions available: ${totalFound}`);
64
62
  }
65
63
 
66
- // Get the nextPageId for the next iteration
67
- // nextPageId = response.nextPageId && response.nextPageId !== '' ? response.nextPageId : null;
68
64
  offset+=100;
69
65
 
70
66
  } catch (error) {
@@ -109,7 +105,7 @@ async function fetchJobDescription(jobId) {
109
105
  async function getSmartTokenFromCMS() {
110
106
  const result = await wixData.query(COLLECTIONS.API_KEY).limit(1).find();
111
107
  if (result.items.length > 0) {
112
- return result.items[0].token; // This is your string token
108
+ return result.items[0].token;
113
109
  } else {
114
110
  throw new Error('[getSmartTokenFromCMS], No token found');
115
111
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.269",
3
+ "version": "1.7.270",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {