chore: rm some useless mgmt func

This commit is contained in:
DDDHuang 2022-04-13 15:59:22 +08:00
parent bf827cffa8
commit 1edf9fd086
1 changed files with 3 additions and 25 deletions

View File

@ -93,23 +93,13 @@
]).
%% Common Table API
-export([ item/2
, max_row_limit/0
-export([ max_row_limit/0
]).
-export([ return/0
, return/1]).
-define(APP, emqx_management).
-elvis([{elvis_style, god_modules, disable}]).
%% TODO: remove these function after all api use minirest version 1.X
return() ->
ok.
return(_Response) ->
ok.
%%--------------------------------------------------------------------
%% Node Info
%%--------------------------------------------------------------------
@ -331,7 +321,8 @@ call_client(Node, ClientId, Req) ->
do_list_subscriptions() ->
case check_row_limit([mqtt_subproperty]) of
false -> throw(max_row_limit);
ok -> [item(subscription, Sub) || Sub <- ets:tab2list(mqtt_subproperty)]
ok -> [#{topic => Topic, clientid => ClientId, options => Options}
|| {{Topic, ClientId}, Options} <- ets:tab2list(mqtt_subproperty)]
end.
list_subscriptions(Node) ->
@ -452,19 +443,6 @@ create_banned(Banned) ->
delete_banned(Who) ->
emqx_banned:delete(Who).
%%--------------------------------------------------------------------
%% Common Table API
%%--------------------------------------------------------------------
item(subscription, {{Topic, ClientId}, Options}) ->
#{topic => Topic, clientid => ClientId, options => Options};
%% TODO: may be delete
item(route, #route{topic = Topic, dest = Node}) ->
#{topic => Topic, node => Node};
item(route, {Topic, Node}) ->
#{topic => Topic, node => Node}.
%%--------------------------------------------------------------------
%% Internal Functions.
%%--------------------------------------------------------------------