Compare commits

...

1 Commits

Author SHA1 Message Date
Chris db5ff06991 stylet: run erlfmt on emqx_management 2022-04-26 15:34:54 +02:00
1 changed files with 2 additions and 1 deletions

View File

@ -158,7 +158,8 @@ banned(post, #{body := Body}) ->
{400, 'BAD_REQUEST', list_to_binary(Reason)};
Ban ->
case emqx_banned:create(Ban) of
{ok, Banned} -> {200, format(Banned)};
{ok, Banned} ->
{200, format(Banned)};
{error, {already_exist, Old}} ->
OldBannedFormat = emqx_json:encode(format(Old)),
{400, 'ALREADY_EXISTS', OldBannedFormat}