fix(authn): fix bad list comprehension

This commit is contained in:
zhouzb 2021-10-27 15:08:02 +08:00
parent 7311132d49
commit a712daaebc
1 changed files with 1 additions and 1 deletions

View File

@ -134,7 +134,7 @@ destroy(#{'_unique' := Unique}) ->
parse_query(Query) ->
case re:run(Query, ?RE_PLACEHOLDER, [global, {capture, all, binary}]) of
{match, Captured} ->
PlaceHolders = [PlaceHolder || ["\\" ++ PlaceHolder] <- Captured],
PlaceHolders = ["\\" ++ PlaceHolder || [PlaceHolder] <- Captured],
Replacements = ["$" ++ integer_to_list(I) || I <- lists:seq(1, length(Captured))],
NQuery = lists:foldl(fun({PlaceHolder, Replacement}, Query0) ->
re:replace(Query0, PlaceHolder, Replacement, [{return, binary}])