removed wrong apikey for domains
Signed-off-by: tracer <tracer@24unix.net>
This commit is contained in:
parent
83709d06e0
commit
657eeb0496
|
@ -90,11 +90,10 @@ class RequestController
|
|||
}
|
||||
|
||||
/**
|
||||
* @return array|bool
|
||||
* @return void
|
||||
*/
|
||||
public function handleDomainGetRequest(): void
|
||||
{
|
||||
$result = '';
|
||||
if (empty($this->uri[3])) {
|
||||
$this->result = $this->domainController->findAll();
|
||||
} else {
|
||||
|
@ -107,6 +106,7 @@ class RequestController
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
|
@ -115,7 +115,6 @@ class RequestController
|
|||
$name = $_POST['name'] ?? '';
|
||||
$a = $_POST['a'] ?? '';
|
||||
$aaaa = $_POST['aaaa'] ?? '';
|
||||
$apikey = $_POST['apikey'] ?? '';
|
||||
if (empty($name)) {
|
||||
$this->status = "400 Bad Request";
|
||||
$this->message = "A name is required";
|
||||
|
@ -128,7 +127,7 @@ class RequestController
|
|||
$this->status = "400 Bad request";
|
||||
$this->message = "Domain: $name already exists.";
|
||||
} else {
|
||||
$result = $this->domainController->insert($name, $a, $aaaa, $apikey);
|
||||
$result = $this->domainController->insert($name, $a, $aaaa);
|
||||
$this->status = "201 Created";
|
||||
$this->message = $result;
|
||||
}
|
||||
|
@ -154,7 +153,6 @@ class RequestController
|
|||
$name = $put['name'] ?? "";
|
||||
$a = $put['a'] ?? "";
|
||||
$aaaa = $put['aaaa'] ?? "";
|
||||
$apikey = $put['apikey'] ?? "";
|
||||
|
||||
if ($id == 0) {
|
||||
$this->status = "400 Bad Request";
|
||||
|
@ -173,7 +171,7 @@ class RequestController
|
|||
$this->status = "400 Bad Request";
|
||||
$this->message = "At least one IP address is required.";
|
||||
} else {
|
||||
$dcResult = $this->domainController->update($id, $name, $a, $aaaa, $apikey);
|
||||
$dcResult = $this->domainController->update($id, $name, $a, $aaaa);
|
||||
$this->status = "201 Updated";
|
||||
$this->message = $dcResult;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue