Update for new format.

This commit is contained in:
Tweak authored and GitHub committed 2022-09-14 17:57:27 -06:00
1 parent ffeac9cca1
commit 6b9eee3c24
1 file changed
+2 -2
+2 -2
View File
@@ -2,10 +2,10 @@ const { checkIfValidIP, checkIfValidFQDN } = require('./utils.js');
function checkRecords(data) {
const recordType = Object.keys(data.target)[0]
if (recordType.toLowerCase() === "a") {
return checkIfValidIP(data.target[recordType])
return checkIfValidIP(data.target[recordType].value)
}
if (recordType.toLowerCase() === "cname") {
return checkIfValidFQDN(data.target[recordType])
return checkIfValidFQDN(data.target[recordType].value)
}
return false;
}