From 7281f1658513cf22f83f472d215c850269087637 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Wed, 29 Jul 2020 09:19:28 +0200 Subject: [PATCH] select also for a type --- script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.js b/script.js index 95453f9..40cc840 100644 --- a/script.js +++ b/script.js @@ -42,7 +42,7 @@ async function update(newIP) { if (!zones.length) throw new Error(`No ZONE "${ZONE}" found`) const zoneId = zones[0].id - const { result: records } = await cf.dnsRecords.browse(zoneId, { name: DNS_RECORD }) + const { result: records } = await cf.dnsRecords.browse(zoneId, { name: DNS_RECORD, type: 'A' }) const recordAlreadyExists = records.length if (recordAlreadyExists) {