sr-npm 1.7.267 → 1.7.268
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
|
@@ -127,7 +127,7 @@ async function saveJobsDescriptionsAndLocationApplyUrlToCMS() {
|
|
|
127
127
|
const updatedJob = {
|
|
128
128
|
...job,
|
|
129
129
|
locationAddress: jobLocation,
|
|
130
|
-
jobDescription: jobDetails.jobAd.sections,
|
|
130
|
+
jobDescription: jobDetails.jobAd.sections.jobDescription,
|
|
131
131
|
applyLink: applyLink,
|
|
132
132
|
};
|
|
133
133
|
await wixData.update(COLLECTIONS.JOBS, updatedJob);
|
|
@@ -260,7 +260,7 @@ async function referenceJobsToField({ referenceField, sourceCollection, jobField
|
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
function fetchApplyLink(jobDetails) {
|
|
263
|
-
return jobDetails.
|
|
263
|
+
return jobDetails.applyUrl;
|
|
264
264
|
}
|
|
265
265
|
|
|
266
266
|
function fetchJobLocation(jobDetails) {
|
|
@@ -47,7 +47,7 @@ async function fetchPositionsFromSRAPI() {
|
|
|
47
47
|
page++;
|
|
48
48
|
|
|
49
49
|
// Build the API path - first request has no page parameter, subsequent use nextPageId
|
|
50
|
-
let apiPath = `/v1/companies/${companyId.value}/postings?offset=${offset}
|
|
50
|
+
let apiPath = `/v1/companies/${companyId.value}/postings?offset=${offset}`;
|
|
51
51
|
|
|
52
52
|
console.log(`Fetching page ${page} with path: ${apiPath}`);
|
|
53
53
|
const response = await makeSmartRecruitersRequest(apiPath,token);
|
|
@@ -67,7 +67,7 @@ async function fetchPositionsFromSRAPI() {
|
|
|
67
67
|
|
|
68
68
|
// Get the nextPageId for the next iteration
|
|
69
69
|
// nextPageId = response.nextPageId && response.nextPageId !== '' ? response.nextPageId : null;
|
|
70
|
-
offset+=
|
|
70
|
+
offset+=100;
|
|
71
71
|
|
|
72
72
|
} catch (error) {
|
|
73
73
|
console.error(`Error fetching page ${page}:`, error);
|
|
@@ -104,7 +104,8 @@ async function fetchPositionsFromSRAPI() {
|
|
|
104
104
|
|
|
105
105
|
async function fetchJobDescription(jobId) {
|
|
106
106
|
const token = await getSmartTokenFromCMS();
|
|
107
|
-
|
|
107
|
+
const companyId = await secretsData.getCompanyId();
|
|
108
|
+
return await makeSmartRecruitersRequest(`/v1/companies/${companyId.value}/postings/${jobId}`,token);
|
|
108
109
|
}
|
|
109
110
|
|
|
110
111
|
async function getSmartTokenFromCMS() {
|