fix: topic rewrite api method

This commit is contained in:
DDDHuang 2021-08-26 10:08:01 +08:00
parent 005332d45d
commit 6d7d94c452
1 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ rewrite_api() ->
<<"200">> => object_array_schema(properties(), <<"List all rewrite rules">>)
}
},
post => #{
put => #{
description => <<"Update topic rewrite">>,
'requestBody' => object_array_schema(properties()),
responses => #{
@ -63,7 +63,7 @@ rewrite_api() ->
topic_rewrite(get, _Params) ->
{200, emqx_rewrite:list()};
topic_rewrite(post, #{body := Body}) ->
topic_rewrite(put, #{body := Body}) ->
case length(Body) < ?MAX_RULES_LIMIT of
true ->
ok = emqx_rewrite:update(Body),