Refactor domain handling in API controller

This commit is contained in:
Andras Bacsai 2024-03-07 12:36:49 +01:00
parent 9d31d990fc
commit bbfbd4a105

View File

@ -45,12 +45,10 @@ public function domains(Request $request)
]);
}
} else {
if (!$settings->public_ipv4 && !$settings->public_ipv6) {
$domains->push([
'domain' => $fqdn,
'ip' => $ip,
]);
}
$domains->push([
'domain' => $fqdn,
'ip' => $ip,
]);
}
}
}
@ -83,12 +81,10 @@ public function domains(Request $request)
]);
}
} else {
if (!$settings->public_ipv4 && !$settings->public_ipv6) {
$domains->push([
'domain' => $fqdn,
'ip' => $ip,
]);
}
$domains->push([
'domain' => $fqdn,
'ip' => $ip,
]);
}
}
}