Skip to content

Commit

Permalink
Replaces trimStart with replace to de-duplicate path in pagination re…
Browse files Browse the repository at this point in the history
…quest.
  • Loading branch information
jeramysoucy committed Jan 8, 2024
1 parent 9bd991d commit 9f6bad9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/snyk.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ async function paginateRestResponseData (url, headers, method = 'get') {
json: true
})
reponseData.push(...response.data)
if (response.links.next) url = baseRestUrl + response.links.next.trimStart('/rest')
if (response.links.next) url = baseRestUrl + response.links.next.replace('/rest','')
else url = undefined
} while (url)

Expand Down

0 comments on commit 9f6bad9

Please sign in to comment.