fix(authn): fix placeholders are not replaced correctly
This commit is contained in:
parent
d1b3377c52
commit
4ae38b7c6a
|
@ -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 ->
|
||||
|
|
Loading…
Reference in New Issue