mirror of
https://github.com/cupcakearmy/docker-ddns-cloudflare.git
synced 2025-09-01 10:50:41 +00:00
select also for a type
This commit is contained in:
@@ -42,7 +42,7 @@ async function update(newIP) {
|
|||||||
if (!zones.length) throw new Error(`No ZONE "${ZONE}" found`)
|
if (!zones.length) throw new Error(`No ZONE "${ZONE}" found`)
|
||||||
|
|
||||||
const zoneId = zones[0].id
|
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
|
const recordAlreadyExists = records.length
|
||||||
if (recordAlreadyExists) {
|
if (recordAlreadyExists) {
|
||||||
|
Reference in New Issue
Block a user