mirror of
https://github.com/tiennm99/is-a-good-dev.git
synced 2026-10-14 08:18:21 +00:00
Update checkRecords.js
This commit is contained in:
1 parent
b615f71695
commit
115979709a
1 file changed
+4
-2
@@ -1,8 +1,10 @@
|
||||
const { checkIfValidIP, checkIfValidFQDN } = require('./utils.js');
|
||||
const { checkIfValidIP, checkIfValidFQDN, checkInvalidDomain } = require('./utils.js');
|
||||
|
||||
function checkRecords(data) {
|
||||
const recordType = Object.keys(data.target)[0];
|
||||
|
||||
|
||||
if (checkInvalidDomain(data.target[recordType].name) === true) return false;
|
||||
|
||||
if (recordType.toLowerCase() === 'a') {
|
||||
return checkIfValidIP(data.target[recordType].value);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user