Browse Source

fix(slow_subs): fix response data type error

lafirest 4 years atrás
parent
commit
8e2ff381a4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      apps/emqx_slow_subs/src/emqx_slow_subs_api.erl

+ 1 - 1
apps/emqx_slow_subs/src/emqx_slow_subs_api.erl

@@ -107,7 +107,7 @@ slow_subs(get, _) ->
     SortedL = lists:sort(SortFun, RankL),
     SortedL = lists:sort(SortFun, RankL),
     SortedL2 = lists:sublist(SortedL, ?MAX_SIZE),
     SortedL2 = lists:sublist(SortedL, ?MAX_SIZE),
 
 
-    {200, SortedL2}.
+    {200, #{data => SortedL2}}.
 
 
 get_history() ->
 get_history() ->
     Node = node(),
     Node = node(),