Skip to content

Commit 7ca9a3a

Browse files
fix: correct sync token usage in fetch function
1 parent 982d726 commit 7ca9a3a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/fetch.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ exports.fetchContentTypes = async (config, contentTypeOption) => {
9191
globalConfig = config;
9292
try {
9393
config.cdn = config.cdn ? config.cdn : 'https://cdn.contentstack.io/v3';
94-
9594
const url = 'content_types';
9695
const responseKey = 'content_types';
9796
const contentType = new OPTION_CLASS_MAPPING[contentTypeOption]();
@@ -280,7 +279,7 @@ const processSyncTokens = async (url, config, aggregatedResponse, syncToken) =>
280279
// Attempt to fetch data using the token, with retries.
281280
while (SyncRetryCount <= config.httpRetries) {
282281
try {
283-
syncResponse = await fetchCsData(url, config, { sync_token: "token" });
282+
syncResponse = await fetchCsData(url, config, { sync_token: token });
284283
break;
285284
} catch (error) {
286285
SyncRetryCount++;

0 commit comments

Comments
 (0)