diff options
Diffstat (limited to 'classes/Handler/LastreadHandler.php')
| -rw-r--r-- | classes/Handler/LastreadHandler.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/classes/Handler/LastreadHandler.php b/classes/Handler/LastreadHandler.php index e4ea81b..cdaade0 100644 --- a/classes/Handler/LastreadHandler.php +++ b/classes/Handler/LastreadHandler.php @@ -30,7 +30,7 @@ class LastreadHandler implements RequestHandlerInterface, AuthRequired return (new Response()) ->withStatus(404) - ->withBody("Not found."); + ->withBody(json_encode(["error" => "Not found."])); } private function handleStore(int $bookid, int $page, string $cfi, int $timestamp): Response @@ -79,7 +79,7 @@ class LastreadHandler implements RequestHandlerInterface, AuthRequired (string) $request->getAttribute('cfi', ''), (int) $request->getAttribute('timestamp'), ), - default => (new Response())->withStatus(404)->withBody("Not found."), + default => (new Response())->withStatus(404)->withBody(json_encode(["error" => "Not found."])), }; } } |
