fix(authn): fix placeholders are not replaced correctly

This commit is contained in:
zhouzb 2021-10-20 10:14:47 +08:00 committed by x1001100011
parent 0d38b75bb2
commit 257bc353a4
1 changed files with 1 additions and 1 deletions

View File

@ -144,7 +144,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],
NQuery = re:replace(Query, "'\\$\\{[a-z0-9\\_]+\\}'", "?", [global, {return, binary}]),
{NQuery, PlaceHolders};
nomatch ->