Skip to content

Commit

Permalink
Merge pull request #31 from jeramysoucy/fix-duplication-in-pagination…
Browse files Browse the repository at this point in the history
…-path

Fixes '/rest' duplication in pagination path
  • Loading branch information
jeramysoucy authored Jan 10, 2024
2 parents 9bd991d + 1adb27b commit b35dd8c
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 b35dd8c

Please sign in to comment.