mirror of
https://github.com/plausible/analytics.git
synced 2024-11-28 21:47:25 +03:00
Refactor how is_binary is applied in get_domain/2
This commit is contained in:
parent
76085fa0cb
commit
d8fd6ac575
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user