We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 686e817 commit eb8e246Copy full SHA for eb8e246
main.js
@@ -6,11 +6,15 @@
6
const cp = require("child_process");
7
8
const getCurrentRecordId = () => {
9
+ const params = new URLSearchParams({
10
+ name: process.env.INPUT_NAME,
11
+ });
12
+
13
//https://api.cloudflare.com/#dns-records-for-a-zone-list-dns-records
14
const { status, stdout } = cp.spawnSync("curl", [
15
...["--header", `Authorization: Bearer ${process.env.INPUT_TOKEN}`],
16
...["--header", "Content-Type: application/json"],
- `https://api.cloudflare.com/client/v4/zones/${process.env.INPUT_ZONE}/dns_records?name=${process.env.INPUT_NAME}`,
17
+ `https://api.cloudflare.com/client/v4/zones/${process.env.INPUT_ZONE}/dns_records?${params.toString()}`,
18
]);
19
20
if (status !== 0) {
0 commit comments