From 72a27e9d8fe40eb124ee492e8b25b0c7e738006f Mon Sep 17 00:00:00 2001 From: zhouzb Date: Fri, 24 Dec 2021 13:44:28 +0800 Subject: [PATCH] fix: fix undefined function call --- apps/emqx_authz/src/emqx_authz.erl | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/apps/emqx_authz/src/emqx_authz.erl b/apps/emqx_authz/src/emqx_authz.erl index 97e0fb595..d02da0958 100644 --- a/apps/emqx_authz/src/emqx_authz.erl +++ b/apps/emqx_authz/src/emqx_authz.erl @@ -31,7 +31,6 @@ , lookup/0 , lookup/1 , move/2 - , move/3 , update/2 , authorize/5 ]). @@ -109,15 +108,12 @@ lookup(Type) -> {Source, _Front, _Rear} = take(Type), Source. -move(Type, Cmd) -> - move(Type, Cmd, #{}). - -move(Type, #{<<"before">> := Before}, Opts) -> - emqx_authz_utils:update_config(?CONF_KEY_PATH, {?CMD_MOVE, type(Type), ?CMD_MOVE_BEFORE(type(Before))}, Opts); -move(Type, #{<<"after">> := After}, Opts) -> - emqx_authz_utils:update_config(?CONF_KEY_PATH, {?CMD_MOVE, type(Type), ?CMD_MOVE_AFTER(type(After))}, Opts); -move(Type, Position, Opts) -> - emqx_authz_utils:update_config(?CONF_KEY_PATH, {?CMD_MOVE, type(Type), Position}, Opts). +move(Type, #{<<"before">> := Before}) -> + emqx_authz_utils:update_config(?CONF_KEY_PATH, {?CMD_MOVE, type(Type), ?CMD_MOVE_BEFORE(type(Before))}); +move(Type, #{<<"after">> := After}) -> + emqx_authz_utils:update_config(?CONF_KEY_PATH, {?CMD_MOVE, type(Type), ?CMD_MOVE_AFTER(type(After))}); +move(Type, Position) -> + emqx_authz_utils:update_config(?CONF_KEY_PATH, {?CMD_MOVE, type(Type), Position}). update({?CMD_REPLACE, Type}, Sources) -> emqx_authz_utils:update_config(?CONF_KEY_PATH, {{?CMD_REPLACE, type(Type)}, Sources});