@lsby/cloudflare-ipv6-ddns 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -36,7 +36,11 @@ async function 增加或更新dns记录(cf句柄, 区域id, 域名, ip地址,
|
|
|
36
36
|
}
|
|
37
37
|
if (目标.id == null)
|
|
38
38
|
throw new Error('无法获得需要的信息');
|
|
39
|
-
|
|
39
|
+
if (目标.content == ip地址) {
|
|
40
|
+
console.log('找到域名%O对应的记录, 发现ip没有变化, 什么都不做', 域名);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
console.log('找到域名%O对应的记录, 发现ip有变化, 将修改该记录', 域名);
|
|
40
44
|
await cf句柄.dns.records.edit(目标.id, {
|
|
41
45
|
zone_id: 区域id,
|
|
42
46
|
content: ip地址,
|