api: return error on unknown method
This commit is contained in:
parent
68539f8b55
commit
b792cd703a
1 changed files with 5 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue