fix: get plugin config in json
This commit is contained in:
parent
d2ecccc2ff
commit
f343cd2021
|
@ -486,9 +486,9 @@ update_plugin(put, #{bindings := #{name := Name, action := Action}}) ->
|
|||
return(204, Res).
|
||||
|
||||
plugin_config(get, #{bindings := #{name := Name}}) ->
|
||||
case emqx_plugins:get_plugin_config(Name, #{format => ?CONFIG_FORMAT_AVRO}) of
|
||||
{ok, AvroBin} ->
|
||||
{200, #{<<"content-type">> => <<"application/octet-stream">>}, AvroBin};
|
||||
case emqx_plugins:get_plugin_config(Name, #{format => ?CONFIG_FORMAT_MAP}) of
|
||||
{ok, AvroJson} ->
|
||||
{200, #{<<"content-type">> => <<"'application/json'">>}, AvroJson};
|
||||
{error, _} ->
|
||||
{400, #{
|
||||
code => 'BAD_CONFIG',
|
||||
|
|
Loading…
Reference in New Issue