summaryrefslogtreecommitdiffstats
path: root/application/controllers/api.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-02-03 11:12:01 +0100
committerFlorian Pritz <bluewind@xinu.at>2015-02-03 11:12:01 +0100
commit6816970229c6d0bd46ba46ecd70199c0687952da (patch)
tree93b24ece3ef8307070a16052cb7b24350696cd81 /application/controllers/api.php
parente2c2740365b1f25beca1e174c8c5bda2950b7466 (diff)
api: handle json reply in api controller
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/controllers/api.php')
-rw-r--r--application/controllers/api.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/application/controllers/api.php b/application/controllers/api.php
index 490f59c2c..dc31f47d2 100644
--- a/application/controllers/api.php
+++ b/application/controllers/api.php
@@ -48,7 +48,7 @@ class Api extends MY_Controller {
if (!method_exists($c, $function)) {
throw new \exceptions\PublicApiException("api/unknown-function", "Unknown function requested");
}
- return $c->$function();
+ return send_json_reply($c->$function());
} catch (\exceptions\PublicApiException $e) {
return send_json_error_reply($e->get_error_id(), $e->getMessage(), $e->get_data());
}