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
1 changed files with 5 additions and 0 deletions

View File

@ -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);