Compare commits

..

2 Commits

Author SHA1 Message Date
tracer 073d9cae9e removed debug info 2022-01-29 16:20:55 +01:00
tracer 1fb840206c removed debug info 2022-01-29 16:20:40 +01:00
2 changed files with 5 additions and 12 deletions

View File

@ -152,7 +152,6 @@ class BindAPI
{
$nameServers = $this->nameserverController->findAll();
foreach($nameServers as $nameServer) {
echo COLOR_DEFAULT . ' ' . $nameServer['name'];
if (!empty($nameServer['aaaa'])) {
$result = $this->checkController->sendCommand(serverName: $nameServer['name'],
versionIP: 6,
@ -196,8 +195,6 @@ class BindAPI
post: true,
body: $body);
}
} else {
echo 'error';
}
}
}
@ -233,15 +230,10 @@ class BindAPI
exit(1);
}
$domains = json_decode(json: $result['data']);
if ($domains['error']) {
echo $domains['data'];
exit(1);
}
$maxDomainName = 0;
// TODO this is ugly code
foreach ($domains as $domain) {
if (($domain->id_parent_domain == 0 && !str_contains(haystack: $domain->domain, needle: $panel['name'])) && (strlen(string: $domain->domain) > $maxDomainName)) {
$maxDomainName = strlen(string: $domain->domain);

View File

@ -63,8 +63,9 @@ class CheckController
case 401:
$result = 'Missing or wrong API Key';
break;
case 404:
$result = '404 Not Found';
default:
echo __FILE__, __LINE__, $resultJSON;
$result = 'Unhandled error: ' . $httpResponse;
}
} else {
@ -73,7 +74,7 @@ class CheckController
}
curl_close(handle: $curl);
return [
'error' => true,
'error' => $error,
'data' => $result,
'header' => $httpResponse ?? ''
];