瀏覽代碼

Update clean_acl_cache API

turtled 8 年之前
父節點
當前提交
f6025404e3
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/emqttd_rest_api.erl

+ 2 - 1
src/emqttd_rest_api.erl

@@ -138,8 +138,9 @@ kick_client('DELETE', _Params, Key) ->
         false -> {error, [{code, ?ERROR12}]}
     end.
 
-clean_acl_cache('PUT', Params, Key) ->
+clean_acl_cache('PUT', Params, Key0) ->
     Topic = get_value(<<"topic">>, Params),
+    [Key | _] = string:tokens(Key0, "/"),
     case emqttd_mgmt:clean_acl_cache(l2b(Key), Topic) of
         true  -> {ok, []};
         false -> {error, [{code, ?ERROR12}]}