summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-12-17 13:31:12 +0300
committerAndrew Dolgov <[email protected]>2009-12-17 13:31:12 +0300
commitb792cd703ac554c611891b0f1a092034813c9b7c (patch)
tree0f12d38c60e30c56c9952f34285d9bee5b784d2b /api
parent68539f8b55a26e4c9edbfa7174db5739fc35ce63 (diff)
api: return error on unknown method
Diffstat (limited to 'api')
-rw-r--r--api/index.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/api/index.php b/api/index.php
index d3b5ff4fe..5c1efd15e 100644
--- a/api/index.php
+++ b/api/index.php
@@ -364,6 +364,11 @@
$pref_name = db_escape_string($_REQUEST["pref_name"]);
print json_encode(array("value" => get_pref($link, $pref_name)));
break;
+
+ default:
+ print json_encode(array("error" => 'UNKNOWN_METHOD'));
+ break;
+
}
db_close($link);