Skip to content

Commit

Permalink
fix: add encoding to the cursors (#8702)
Browse files Browse the repository at this point in the history
  • Loading branch information
aubin-tchoi authored Nov 17, 2024
1 parent 8d0b891 commit 387f236
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions connectors/src/connectors/zendesk/lib/zendesk_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export async function fetchZendeskArticlesInCategory({
const response = await fetchFromZendeskWithRetries({
url:
`https://${subdomain}.zendesk.com/api/v2/help_center/categories/${categoryId}/articles?page[size]=${pageSize}` +
(cursor ? `&page[after]=${cursor}` : ""),
(cursor ? `&page[after]=${encodeURIComponent(cursor)}` : ""),
accessToken,
});
return (
Expand Down Expand Up @@ -212,7 +212,7 @@ export async function fetchRecentlyUpdatedTickets({
const response = await fetchFromZendeskWithRetries({
url:
`https://${subdomain}.zendesk.com/api/v2/incremental/tickets/cursor.json` +
(cursor ? `?cursor=${cursor}` : "") +
(cursor ? `?cursor=${encodeURIComponent(cursor)}` : "") +
(startTime ? `?start_time=${startTime}` : ""),
accessToken,
});
Expand Down Expand Up @@ -248,7 +248,7 @@ export async function fetchSolvedZendeskTicketsInBrand({
const response = await fetchFromZendeskWithRetries({
url:
`https://${brandSubdomain}.zendesk.com/api/v2/search/export.json?query=${searchQuery}&filter[type]=ticket&page[size]=${pageSize}` +
(cursor ? `&page[after]=${cursor}` : ""),
(cursor ? `&page[after]=${encodeURIComponent(cursor)}` : ""),
accessToken,
});

Expand Down

0 comments on commit 387f236

Please sign in to comment.