fix(authn_redis): make dialyzer happy

This commit is contained in:
firest 2022-09-14 14:16:43 +08:00
parent 9e97760520
commit 62fd955a0e
1 changed files with 9 additions and 2 deletions

View File

@ -141,8 +141,8 @@ authenticate(
{ok, []} ->
ignore;
{ok, Values} ->
case lists:all(fun(E) -> E =:= undefined end, Values) of
true ->
case check_query_matched(Values) of
false ->
%% key not exists
ignore;
_ ->
@ -228,3 +228,10 @@ merge(Fields, Values) ->
|| {K, V} <- lists:zip(Fields, Values), V =/= undefined
]
).
check_query_matched(undefined) ->
false;
check_query_matched(List) when is_list(List) ->
lists:any(fun(E) -> E =/= undefined end, List);
check_query_matched(_) ->
true.