api: return error on unknown method

This commit is contained in:
Andrew Dolgov 2009-12-17 13:31:12 +03:00
parent 68539f8b55
commit b792cd703a

View file

@ -364,6 +364,11 @@
$pref_name = db_escape_string($_REQUEST["pref_name"]); $pref_name = db_escape_string($_REQUEST["pref_name"]);
print json_encode(array("value" => get_pref($link, $pref_name))); print json_encode(array("value" => get_pref($link, $pref_name)));
break; break;
default:
print json_encode(array("error" => 'UNKNOWN_METHOD'));
break;
} }
db_close($link); db_close($link);