Skip to content

Commit

Permalink
Improve naming
Browse files Browse the repository at this point in the history
  • Loading branch information
sasa1977 committed Mar 22, 2024
1 parent ba1ce3a commit 02d21e0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/site_encrypt/phoenix/endpoint.ex
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ defmodule SiteEncrypt.Phoenix.Endpoint do
end

@doc false
defmacro __using__(static_opts) do
quote bind_quoted: [static_opts: static_opts] do
{endpoint_opts, static_opts} = Keyword.split(static_opts, [:otp_app])
use Phoenix.Endpoint, endpoint_opts
defmacro __using__(opts) do
quote bind_quoted: [opts: opts] do
{phoenix_using_opts, using_opts} = Keyword.split(opts, [:otp_app])
use Phoenix.Endpoint, phoenix_using_opts

@behaviour SiteEncrypt
require SiteEncrypt
Expand All @@ -50,7 +50,7 @@ defmodule SiteEncrypt.Phoenix.Endpoint do
Supervisor.child_spec(
{
SiteEncrypt.Phoenix.Endpoint,
unquote(static_opts)
unquote(using_opts)
|> Config.Reader.merge(opts)
|> Keyword.put(:endpoint, __MODULE__)
},
Expand Down

0 comments on commit 02d21e0

Please sign in to comment.