select also for a type

This commit is contained in:
cupcakearmy 2020-07-29 09:19:28 +02:00
parent 5a40bf5503
commit 7281f16585
No known key found for this signature in database
GPG Key ID: D28129AE5654D9D9

View File

@ -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) {