Refactor how is_binary is applied in get_domain/2

This commit is contained in:
Artur Pata 2024-09-19 19:58:17 +03:00
parent 76085fa0cb
commit d8fd6ac575

View File

@ -83,7 +83,8 @@ defmodule PlausibleWeb.Plugs.AuthorizeSiteAccess do
end
defp get_domain(conn, site_param) do
if is_binary(domain = conn.params[site_param]) do
domain = conn.params[site_param]
if is_binary(domain) do
{:ok, domain}
else
error_not_found(conn)