]> git.wh0rd.org Git - tt-rss.git/commitdiff
api: return error on unknown method
authorAndrew Dolgov <fox@bah.org.ru>
Thu, 17 Dec 2009 10:31:12 +0000 (13:31 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Thu, 17 Dec 2009 10:31:12 +0000 (13:31 +0300)
api/index.php

index d3b5ff4fe419429623770b2056e3ba1bbac00f3a..5c1efd15e97797d5b448a1e5a19179fc8ad92a42 100644 (file)
                        $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);