sr-npm 1.7.42 → 1.7.43
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 +3 -3
- package/package.json +1 -1
package/backend/data.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { items: wixData } = require('@wix/data');
|
|
2
2
|
const { fetchPositionsFromSRAPI, fetchJobDescription } = require('./fetchPositionsFromSRAPI');
|
|
3
3
|
const { chunkedBulkOperation, delay, countJobsPerGivenField, fillCityLocation ,prepateToSaveArray,normalizeCityName} = require('./utils');
|
|
4
|
-
const { QUERY_MAX_LIMIT
|
|
4
|
+
const { QUERY_MAX_LIMIT } = require('./consts');
|
|
5
5
|
const { getAllPositions } = require('./queries');
|
|
6
6
|
|
|
7
7
|
|
|
@@ -94,7 +94,7 @@ async function saveJobsDescriptionsAndLocationToCMS() {
|
|
|
94
94
|
locationAddress: jobLocation,
|
|
95
95
|
jobDescription: jobDetails.jobAd.sections,
|
|
96
96
|
};
|
|
97
|
-
await wixData.update(
|
|
97
|
+
await wixData.update('Jobs1', updatedJob);
|
|
98
98
|
return { success: true, jobId: job._id, title: job.title };
|
|
99
99
|
} catch (error) {
|
|
100
100
|
console.error(` ❌ Failed to update ${job.title} (${job._id}):`, error);
|
|
@@ -178,7 +178,7 @@ async function aggregateJobsByFieldToCMS({ field, collection }) {
|
|
|
178
178
|
|
|
179
179
|
async function getJobsWithNoDescriptions() {
|
|
180
180
|
let jobswithoutdescriptionsQuery = await wixData
|
|
181
|
-
.query(
|
|
181
|
+
.query('Jobs1')
|
|
182
182
|
.limit(QUERY_MAX_LIMIT)
|
|
183
183
|
.isEmpty('jobDescription')
|
|
184
184
|
.find();
|