Skip to content

Commit

Permalink
Increase page limit size to return more records from cloudflare (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
koistya authored Jul 22, 2021
2 parents 53e5806 + 323e10a commit c74d866
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
3 changes: 2 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ const pr = event.pull_request ? event.pull_request.number : "?";
let res;
let result;
let id = process.env.INPUT_ID;
let perPage = process.env.PER_PAGE ? process.env.PER_PAGE : "100";

if (!id) {
result = cp.spawnSync("curl", [
...["--header", `Authorization: Bearer ${process.env.INPUT_TOKEN}`],
...["--header", "Content-Type: application/json"],
`https://api.cloudflare.com/client/v4/zones/${process.env.INPUT_ZONE}/dns_records`,
`https://api.cloudflare.com/client/v4/zones/${process.env.INPUT_ZONE}/dns_records?per_page=${perPage}`,
]);

if (result.status !== 0) {
Expand Down

0 comments on commit c74d866

Please sign in to comment.