chore(dialyzer): make code pass dialyzer
This commit is contained in:
parent
bb62b44554
commit
cbc5c64a16
|
@ -36,6 +36,6 @@
|
||||||
|
|
||||||
-record(chain,
|
-record(chain,
|
||||||
{ id :: chain_id()
|
{ id :: chain_id()
|
||||||
, services :: [#service{}]
|
, services :: [{service_name(), #service{}}]
|
||||||
, created_at :: integer()
|
, created_at :: integer()
|
||||||
}).
|
}).
|
||||||
|
|
|
@ -131,7 +131,7 @@ authenticate(ClientInfo = #{password := JWT}, #{jwk := JWK,
|
||||||
destroy(#{jwks_connector := undefined}) ->
|
destroy(#{jwks_connector := undefined}) ->
|
||||||
ok;
|
ok;
|
||||||
destroy(#{jwks_connector := Connector}) ->
|
destroy(#{jwks_connector := Connector}) ->
|
||||||
emqx_authentication_jwks_connector:stop(Connector),
|
_ = emqx_authentication_jwks_connector:stop(Connector),
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
@ -171,7 +171,7 @@ do_create(#{use_jwks := true} = Opts) ->
|
||||||
do_update(Opts, #{jwk_connector := undefined}) ->
|
do_update(Opts, #{jwk_connector := undefined}) ->
|
||||||
do_create(Opts);
|
do_create(Opts);
|
||||||
do_update(#{use_jwks := false} = Opts, #{jwk_connector := Connector}) ->
|
do_update(#{use_jwks := false} = Opts, #{jwk_connector := Connector}) ->
|
||||||
emqx_authentication_jwks_connector:stop(Connector),
|
_ = emqx_authentication_jwks_connector:stop(Connector),
|
||||||
do_create(Opts);
|
do_create(Opts);
|
||||||
do_update(#{use_jwks := true} = Opts, #{jwk_connector := Connector} = State) ->
|
do_update(#{use_jwks := true} = Opts, #{jwk_connector := Connector} = State) ->
|
||||||
ok = emqx_authentication_jwks_connector:update(Connector, Opts),
|
ok = emqx_authentication_jwks_connector:update(Connector, Opts),
|
||||||
|
|
|
@ -119,8 +119,8 @@ authenticate(ClientInfo = #{password := Password},
|
||||||
destroy(#{user_group := UserGroup}) ->
|
destroy(#{user_group := UserGroup}) ->
|
||||||
trans(
|
trans(
|
||||||
fun() ->
|
fun() ->
|
||||||
MatchSpec = [{#user_info{user_id = {UserGroup, '_'}, _ = '_'}, [], ['$_']}],
|
MatchSpec = [{{user_info, {UserGroup, '_'}, '_', '_'}, [], ['$_']}],
|
||||||
lists:foreach(fun delete_user2/1, mnesia:select(?TAB, MatchSpec, write))
|
ok = lists:foreach(fun delete_user2/1, mnesia:select(?TAB, MatchSpec, write))
|
||||||
end).
|
end).
|
||||||
|
|
||||||
import_users(Filename0, State) ->
|
import_users(Filename0, State) ->
|
||||||
|
@ -211,7 +211,7 @@ import_users_from_csv(Filename, #{user_group := UserGroup}) ->
|
||||||
case get_csv_header(File) of
|
case get_csv_header(File) of
|
||||||
{ok, Seq} ->
|
{ok, Seq} ->
|
||||||
Result = trans(fun import/3, [UserGroup, File, Seq]),
|
Result = trans(fun import/3, [UserGroup, File, Seq]),
|
||||||
file:close(File),
|
_ = file:close(File),
|
||||||
Result;
|
Result;
|
||||||
{error, Reason} ->
|
{error, Reason} ->
|
||||||
{error, Reason}
|
{error, Reason}
|
||||||
|
|
Loading…
Reference in New Issue