chore: update apps/emqx_management/src/emqx_mgmt_api_configs.erl

This commit is contained in:
JianBo He 2023-07-18 20:50:23 +08:00 committed by zhongwencool
parent 402f75592e
commit 74532a64e6
1 changed files with 7 additions and 1 deletions

View File

@ -372,7 +372,13 @@ find_suitable_accept(Headers, Preferences) when is_list(Preferences), length(Pre
end end
end. end.
%% Should deprecated json v1 since 5.2.0 %% To return a JSON formatted configuration file, which is used to be compatible with the already
%% implemented `GET /configs` in the old versions 5.0 and 5.1.
%%
%% In e5.1.1, we support to return a hocon configuration file by `get_configs_v2/1`. It's more
%% useful for the user to read or reload the configuration file via HTTP API.
%%
%% The `get_configs_v1/1` should be deprecated since 5.2.0.
get_configs_v1(QueryStr) -> get_configs_v1(QueryStr) ->
Node = maps:get(<<"node">>, QueryStr, node()), Node = maps:get(<<"node">>, QueryStr, node()),
case case