Commit b792cd70 authored by Andrew Dolgov's avatar Andrew Dolgov

api: return error on unknown method

parent 68539f8b
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment