diff --git a/apps/emqx_management/src/emqx_mgmt.erl b/apps/emqx_management/src/emqx_mgmt.erl index fecf77070..b460b69b4 100644 --- a/apps/emqx_management/src/emqx_mgmt.erl +++ b/apps/emqx_management/src/emqx_mgmt.erl @@ -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. %%--------------------------------------------------------------------