fix: DNS save to have work correctly
All checks were successful
Build Docker / Build Image (push) Successful in 1m35s
All checks were successful
Build Docker / Build Image (push) Successful in 1m35s
This commit is contained in:
22
account.py
22
account.py
@@ -529,10 +529,24 @@ def setDNS(account, domain, records):
|
|||||||
for txt in record['txt']:
|
for txt in record['txt']:
|
||||||
TXTRecords.append(txt)
|
TXTRecords.append(txt)
|
||||||
elif record['type'] == 'NS':
|
elif record['type'] == 'NS':
|
||||||
newRecords.append({
|
if 'value' in record:
|
||||||
'type': 'NS',
|
newRecords.append({
|
||||||
'ns': record['value']
|
'type': 'NS',
|
||||||
})
|
'ns': record['value']
|
||||||
|
})
|
||||||
|
elif 'ns' in record:
|
||||||
|
newRecords.append({
|
||||||
|
'type': 'NS',
|
||||||
|
'ns': record['ns']
|
||||||
|
})
|
||||||
|
else:
|
||||||
|
return {
|
||||||
|
'error': {
|
||||||
|
'message': 'Invalid NS record'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
elif record['type'] in ['GLUE4', 'GLUE6', "SYNTH4", "SYNTH6"]:
|
elif record['type'] in ['GLUE4', 'GLUE6', "SYNTH4", "SYNTH6"]:
|
||||||
newRecords.append({
|
newRecords.append({
|
||||||
'type': record['type'],
|
'type': record['type'],
|
||||||
|
|||||||
Reference in New Issue
Block a user