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).
|
return(204, Res).
|
||||||
|
|
||||||
plugin_config(get, #{bindings := #{name := Name}}) ->
|
plugin_config(get, #{bindings := #{name := Name}}) ->
|
||||||
case emqx_plugins:get_plugin_config(Name, #{format => ?CONFIG_FORMAT_AVRO}) of
|
case emqx_plugins:get_plugin_config(Name, #{format => ?CONFIG_FORMAT_MAP}) of
|
||||||
{ok, AvroBin} ->
|
{ok, AvroJson} ->
|
||||||
{200, #{<<"content-type">> => <<"application/octet-stream">>}, AvroBin};
|
{200, #{<<"content-type">> => <<"'application/json'">>}, AvroJson};
|
||||||
{error, _} ->
|
{error, _} ->
|
||||||
{400, #{
|
{400, #{
|
||||||
code => 'BAD_CONFIG',
|
code => 'BAD_CONFIG',
|
||||||
|
|
Loading…
Reference in New Issue