sr-npm 1.7.262 → 1.7.264
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.
|
@@ -40,14 +40,14 @@ async function fetchPositionsFromSRAPI() {
|
|
|
40
40
|
const token = await getSmartTokenFromCMS();
|
|
41
41
|
const companyId=await getCompanyId();
|
|
42
42
|
console.log('Starting to fetch all positions with pagination...');
|
|
43
|
+
let offset=0;
|
|
43
44
|
|
|
44
45
|
do {
|
|
45
46
|
try {
|
|
46
47
|
page++;
|
|
47
48
|
|
|
48
49
|
// Build the API path - first request has no page parameter, subsequent use nextPageId
|
|
49
|
-
|
|
50
|
-
let apiPath = `/v1/companies/${companyId}/postings?offset=0`;
|
|
50
|
+
let apiPath = `/v1/companies/${companyId}/postings?offset=${offset}`;
|
|
51
51
|
if (nextPageId) {
|
|
52
52
|
apiPath += `&pageId=${nextPageId}`;
|
|
53
53
|
}
|