Skip to content

fix: record missing when record count greater than 20 - #19

Open
EkkoG wants to merge 1 commit into
undefinedplayer:masterfrom
EkkoG:patch-1
Open

fix: record missing when record count greater than 20#19
EkkoG wants to merge 1 commit into
undefinedplayer:masterfrom
EkkoG:patch-1

Conversation

@EkkoG

@EkkoG EkkoG commented Jul 16, 2021

Copy link
Copy Markdown

According to the doc https://api.cloudflare.com/#dns-records-for-a-zone-list-dns-records

API only returns 1 page, and 20 records per page, so when record count greater than 20, some record will missing in local cache, then RecordNotFound occur. This patch changes the page size to 100, the max page size, to avoid the issue.

@undefinedplayer undefinedplayer left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. It'll be great to expose per_page as an parameter upstream to the main function and set it default to 100? In that case it would support the case if it has more than 100 records.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants