fix: DNS save to have work correctly
All checks were successful
Build Docker / Build Image (push) Successful in 1m35s

This commit is contained in:
2025-05-21 11:56:23 +10:00
parent 11699834cf
commit a67034de27

View File

@@ -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':
if 'value' in record:
newRecords.append({ newRecords.append({
'type': 'NS', 'type': 'NS',
'ns': record['value'] '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'],