From 1ad945fbf29eeefe6a4ded81dd2eff6ece1b7135 Mon Sep 17 00:00:00 2001 From: tracer Date: Tue, 22 Feb 2022 14:06:35 +0100 Subject: [PATCH] added 201 header Signed-off-by: tracer --- src/Controller/RequestController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controller/RequestController.php b/src/Controller/RequestController.php index 2db8c87..c0dbbba 100644 --- a/src/Controller/RequestController.php +++ b/src/Controller/RequestController.php @@ -380,13 +380,13 @@ class RequestController } else { $domain = new Domain(name: $name, content: $content); if ($result = $this->domainRepository->insert(domain: $domain)) { + $this->header = "201 Created"; $this->status = "201 Created"; - $this->message = $result; } else { $this->header = "500 Server error"; $this->status = "500 Server error"; - $this->message = $result; } + $this->message = $result; } } }