diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2026-05-27 21:19:36 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2026-05-27 21:19:39 +0300 |
| commit | b434f9127fc67d97ed224b22594ecbd232fa4da3 (patch) | |
| tree | 90449be52f3d9b85f449cc65707a75e82cc81b3a /classes/Router.php | |
| parent | 2b28a847f97395d756d16400ce3fb29b8c8bb75e (diff) | |
| download | the-epube-b434f9127fc67d97ed224b22594ecbd232fa4da3.tar.gz the-epube-b434f9127fc67d97ed224b22594ecbd232fa4da3.tar.xz | |
cleanup return values a bit (more json), move common API test stuff to an ancestor class
Diffstat (limited to 'classes/Router.php')
| -rw-r--r-- | classes/Router.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/classes/Router.php b/classes/Router.php index 6afec1e..79882ce 100644 --- a/classes/Router.php +++ b/classes/Router.php @@ -34,7 +34,7 @@ class Router if ($handler instanceof AuthRequired && empty($_SESSION["owner"])) { $response = (new Response()) ->withStatus(401) - ->withBody("Unauthorized"); + ->withBody(json_encode(["error" => "Unauthorized"])); $response->send(); exit; } |
