From 657eeb0496ac19755ff97c1263979b6315c69d1e Mon Sep 17 00:00:00 2001 From: tracer Date: Sat, 22 Jan 2022 17:36:15 +0100 Subject: [PATCH] removed wrong apikey for domains Signed-off-by: tracer --- bindAPI/src/Controller/RequestController.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/bindAPI/src/Controller/RequestController.php b/bindAPI/src/Controller/RequestController.php index 0c2d47a..2ab7b84 100644 --- a/bindAPI/src/Controller/RequestController.php +++ b/bindAPI/src/Controller/RequestController.php @@ -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; }