summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-23 22:26:07 +0300
committerAndrew Dolgov <[email protected]>2021-02-23 22:26:07 +0300
commit8d2e3c2528e67f8650c122f014364a34bf690d2a (patch)
treefd44203c8a5919848f689cb6caa8c0c8d0784d54 /api
parent37d46411c77bda2b1823f7d230b06e36b7125a8d (diff)
drop errors.php and simplify error handling
Diffstat (limited to 'api')
-rw-r--r--api/index.php8
1 files changed, 5 insertions, 3 deletions
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;
}