sr-npm 1.7.37 → 1.7.38

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/data.js CHANGED
@@ -99,7 +99,7 @@ async function saveJobsDescriptionsAndLocationApplyUrlToCMS() {
99
99
  // console.log(` Fetching description for: ${job.title} (${job._id})`);
100
100
  const jobDetails = await fetchJobDescription(job._id);
101
101
  const jobLocation = fetchJobLocation(jobDetails)
102
- const applyLink = jobDetails.actions.applyOnWeb.url;
102
+ const applyLink = fetchApplyLink(jobDetails);
103
103
 
104
104
  const updatedJob = {
105
105
  ...job,
@@ -234,8 +234,7 @@ async function aggregateJobsByFieldToCMS({ field, collection }) {
234
234
 
235
235
  async function getJobsWithNoDescriptions() {
236
236
 
237
- // let jobswithoutdescriptionsQuery = await wixData.query("Jobs").limit(1000).isEmpty("jobDescription").find(); // with 900 as the limit, 429 error won't happen
238
- let jobswithoutdescriptionsQuery = await wixData.query("Jobs").limit(1000).isEmpty("applyLink").find(); // with 900 as the limit, 429 error won't happen
237
+ let jobswithoutdescriptionsQuery = await wixData.query("Jobs").limit(1000).isEmpty("jobDescription").find(); // with 900 as the limit, 429 error won't happen
239
238
  return jobswithoutdescriptionsQuery;
240
239
  }
241
240
 
@@ -293,6 +292,10 @@ async function referenceJobsToField({
293
292
  return { success: true, updated: jobsToUpdate.length };
294
293
  }
295
294
 
295
+ function fetchApplyLink(jobDetails) {
296
+ return jobDetails.actions.applyOnWeb.url;
297
+ }
298
+
296
299
  function fetchJobLocation(jobDetails) {
297
300
  const isZeroLocation = jobDetails.location.latitude === "0.0000" && jobDetails.location.longitude === "0.0000";
298
301
  const jobLocation = {
@@ -1,4 +1,4 @@
1
- const { COLLECTIONS } = require('./consts');
1
+ const { COLLECTIONS } = require('./collectionConsts');
2
2
  const { items } = require('@wix/data');
3
3
 
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.37",
3
+ "version": "1.7.38",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "homepage": "https://github.com/psdevteamenterprise/sr-npm#readme",
19
19
  "dependencies": {
20
- "@hisense-staging/velo-npm": "1.7.249",
20
+ "@hisense-staging/velo-npm": "1.7.251",
21
21
  "@wix/data": "^1.0.211",
22
22
  "@wix/essentials": "^0.1.24",
23
23
  "@wix/secrets": "1.0.53"