From 8d2e3c2528e67f8650c122f014364a34bf690d2a Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 23 Feb 2021 22:26:07 +0300 Subject: drop errors.php and simplify error handling --- api/index.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'api') diff --git a/api/index.php b/api/index.php index 4e2c06b9d..d85a1103c 100644 --- a/api/index.php +++ b/api/index.php @@ -34,9 +34,11 @@ if (!\Sessions\validate_session()) { header("Content-Type: text/json"); - print json_encode(array("seq" => -1, - "status" => 1, - "content" => array("error" => "NOT_LOGGED_IN"))); + print json_encode([ + "seq" => -1, + "status" => API::STATUS_ERR, + "content" => [ "error" => API::E_NOT_LOGGED_IN ] + ]); return; } -- cgit v1.2.3