Compare commits

...

2 Commits

Author SHA1 Message Date
tracer 9c87d47477 fixed wrong column name
Signed-off-by: tracer <tracer@24unix.net>
2022-02-22 16:17:41 +01:00
tracer b0535a3d18 fixed error handling in creating
Signed-off-by: tracer <tracer@24unix.net>
2022-02-22 16:15:29 +01:00
2 changed files with 5 additions and 4 deletions

View File

@ -445,7 +445,7 @@ class BindAPI
echo COLOR_RED . ' ' . $result['header'] . COLOR_DEFAULT;
$arguments = $this->parseArguments();
if (!empty($arguments['fix']) && $arguments['fix'] == 'yes') {
echo 'trying to fix …';
echo ' trying to fix …';
$body = [
'name' => $domainName,
'panel' => $panel->getName(),
@ -474,9 +474,10 @@ class BindAPI
echo $e->getMessage();
exit(1);
}
print_r(value: $create);
if ($create['header'] != 200) {
if ($create['header'] != 201) {
die("make error handling");
} else {
echo COLOR_GREEN . 'OK';
}
}
break;

View File

@ -65,7 +65,7 @@ class DomainRepository
}
$sql = "
SELECT id, name, name
SELECT id, name, panel
FROM . " . DatabaseConnection::TABLE_DOMAINS . "
WHERE id = :id";