fix(exhook): fix bad variable name
This commit is contained in:
parent
da80343108
commit
658ed81cfa
|
@ -34,7 +34,6 @@
|
|||
, unload_server/1
|
||||
, unload_exhooks/0
|
||||
, init_hooks_cnter/0
|
||||
, deinit_hooks_cnter/0
|
||||
]).
|
||||
|
||||
%%--------------------------------------------------------------------
|
||||
|
@ -57,7 +56,6 @@ start(_StartType, _StartArgs) ->
|
|||
prep_stop(State) ->
|
||||
emqx_ctl:unregister_command(exhook),
|
||||
_ = unload_exhooks(),
|
||||
_ = deinit_hooks_cnter(),
|
||||
ok = unload_all_servers(),
|
||||
State.
|
||||
|
||||
|
@ -94,5 +92,3 @@ init_hooks_cnter() ->
|
|||
ok
|
||||
end.
|
||||
|
||||
deinit_hooks_cnter() ->
|
||||
ets:delete(?CNTER).
|
||||
|
|
|
@ -96,8 +96,8 @@ on_client_authenticate(ClientInfo, AuthResult) ->
|
|||
|
||||
case call_fold('client.authenticate', Req,
|
||||
fun merge_responsed_bool/2) of
|
||||
{StopOrOk, #{result := Bool}} when is_boolean(Bool) ->
|
||||
Result = case Bool of true -> success; _ -> not_authorized end,
|
||||
{StopOrOk, #{result := Result0}} when is_boolean(Result0) ->
|
||||
Result = case Result0 of true -> success; _ -> not_authorized end,
|
||||
{StopOrOk, AuthResult#{auth_result => Result, anonymous => false}};
|
||||
_ ->
|
||||
{ok, AuthResult}
|
||||
|
@ -116,8 +116,8 @@ on_client_check_acl(ClientInfo, PubSub, Topic, Result) ->
|
|||
},
|
||||
case call_fold('client.check_acl', Req,
|
||||
fun merge_responsed_bool/2) of
|
||||
{StopOrOk, #{result := Bool}} when is_boolean(Bool) ->
|
||||
NResult = case Bool of true -> allow; _ -> deny end,
|
||||
{StopOrOk, #{result := Result0}} when is_boolean(Result0) ->
|
||||
NResult = case Result0 of true -> allow; _ -> deny end,
|
||||
{StopOrOk, NResult};
|
||||
_ -> {ok, Result}
|
||||
end.
|
||||
|
|
Loading…
Reference in New Issue