Skip to content

Commit b5d0a02

Browse files
committed
Allow passing client_opts to Electric.Client.new/1
1 parent b89cbf4 commit b5d0a02

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

lib/phoenix/sync/electric.ex

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -566,10 +566,9 @@ defmodule Phoenix.Sync.Electric do
566566
credential_params = electric_config |> Keyword.get(:credentials, []) |> Map.new(),
567567
extra_params = electric_config |> Keyword.get(:params, []) |> Map.new(),
568568
params = Map.merge(extra_params, credential_params) do
569-
Electric.Client.new(
570-
base_url: url,
571-
params: params
572-
)
569+
Keyword.get(electric_config, :client_opts, [])
570+
|> Keyword.merge(base_url: url, params: params)
571+
|> Electric.Client.new()
573572
end
574573
end
575574

0 commit comments

Comments
 (0)