diff options
Diffstat (limited to 'classes/Handler/PaginationHandler.php')
| -rw-r--r-- | classes/Handler/PaginationHandler.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/classes/Handler/PaginationHandler.php b/classes/Handler/PaginationHandler.php index 7015dfc..54421d5 100644 --- a/classes/Handler/PaginationHandler.php +++ b/classes/Handler/PaginationHandler.php @@ -24,7 +24,7 @@ class PaginationHandler implements RequestHandlerInterface, AuthRequired return (new Response()) ->withStatus(404) - ->withBody("File not found."); + ->withBody(json_encode(["error" => "File not found."])); } private function handleStore(int $bookid, ?string $payload): Response @@ -62,7 +62,7 @@ class PaginationHandler implements RequestHandlerInterface, AuthRequired return (new Response()) ->withStatus(404) - ->withBody("Not found."); + ->withBody(json_encode(["error" => "Not found."])); } public function handle(Request $request): Response @@ -74,7 +74,7 @@ class PaginationHandler implements RequestHandlerInterface, AuthRequired 'getpagination' => $this->handleGet($bookid), 'storepagination' => $this->handleStore($bookid, $request->getAttribute('payload')), 'deletepagination' => $this->handleDelete($bookid), - default => (new Response())->withStatus(404)->withBody("Not found."), + default => (new Response())->withStatus(404)->withBody(json_encode(["error" => "Not found."])), }; } } |
