Skip to content

Commit c74d866

Browse files
authored
Increase page limit size to return more records from cloudflare (#3)
2 parents 53e5806 + 323e10a commit c74d866

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

main.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ const pr = event.pull_request ? event.pull_request.number : "?";
1111
let res;
1212
let result;
1313
let id = process.env.INPUT_ID;
14+
let perPage = process.env.PER_PAGE ? process.env.PER_PAGE : "100";
1415

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

2223
if (result.status !== 0) {

0 commit comments

Comments
 (0)