mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Don't name integer and string results in API examples (#4198)
Since ejabberd 24.02, mod_http_api does not name any results, previously integer and strings were named, but other results were not. And ejabberdctl obviously does not name results either. Only ejabberd_xmlrpc does. Consequently, the documentation should not name results in the examples.
This commit is contained in:
parent
b6a0c7e57f
commit
ed6762b8ee
@ -247,13 +247,8 @@ json_call(Name, ArgsDesc, Values, ResultDesc, Result, HTMLOutput) ->
|
|||||||
{200, [?STR(Text1)]};
|
{200, [?STR(Text1)]};
|
||||||
{{_, restuple}, {_, Text2}} ->
|
{{_, restuple}, {_, Text2}} ->
|
||||||
{500, [?STR(Text2)]};
|
{500, [?STR(Text2)]};
|
||||||
{{_, {list, _}}, _} ->
|
{{_, _}, _} ->
|
||||||
{200, json_gen(ResultDesc, Result, Indent, HTMLOutput)};
|
{200, json_gen(ResultDesc, Result, Indent, HTMLOutput)}
|
||||||
{{_, {tuple, _}}, _} ->
|
|
||||||
{200, json_gen(ResultDesc, Result, Indent, HTMLOutput)};
|
|
||||||
{{Name0, _}, _} ->
|
|
||||||
{200, [Indent, ?OP_L("{"), ?STR_A(Name0), ?OP_L(": "),
|
|
||||||
json_gen(ResultDesc, Result, Indent, HTMLOutput), ?OP_L("}")]}
|
|
||||||
end,
|
end,
|
||||||
CodeStr = case Code of
|
CodeStr = case Code of
|
||||||
200 -> <<" 200 OK">>;
|
200 -> <<" 200 OK">>;
|
||||||
|
Loading…
Reference in New Issue
Block a user