Skip to content

Commit

Permalink
Update cf-srv.py
Browse files Browse the repository at this point in the history
try to fix
  • Loading branch information
MasterOfStar authored Jun 17, 2024
1 parent f8257e8 commit 426243b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion natter-docker/minecraft/cf-srv.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def _find_srv_record(self, zone_id, name):
f"https://api.cloudflare.com/client/v4/zones/{zone_id}/dns_records"
)
for rec_data in data["result"]:
if rec_data["type"] == "SRV" and rec_data["data"]["name"] == name:
if rec_data["type"] == "SRV" and rec_data["name"] == name:
rec_id = rec_data["id"]
return rec_id
return None
Expand All @@ -150,6 +150,7 @@ def _create_srv_record(self, zone_id, name, service, protocol, port, target,
"target": target,
"weight": weight
},
"name": name,
"proxied": False,
"type": "SRV",
"ttl": ttl
Expand All @@ -173,6 +174,7 @@ def _update_srv_record(self, zone_id, rec_id, name, service, protocol, port, tar
"target": target,
"weight": weight
},
"name": name,
"proxied": False,
"type": "SRV",
"ttl": ttl
Expand Down

0 comments on commit 426243b

Please sign in to comment.