mirror of
https://github.com/plausible/analytics.git
synced 2024-12-23 17:44:43 +03:00
Mix format
This commit is contained in:
parent
7cb148a4f1
commit
bd797c201f
@ -205,7 +205,8 @@ defmodule PlausibleWeb.Api.ExternalController do
|
|||||||
defp get_root_domain(hostname) when is_binary(hostname) do
|
defp get_root_domain(hostname) when is_binary(hostname) do
|
||||||
PublicSuffix.registrable_domain(hostname)
|
PublicSuffix.registrable_domain(hostname)
|
||||||
end
|
end
|
||||||
defp get_root_domain(hostname), do: hostname
|
|
||||||
|
defp get_root_domain(hostname), do: hostname
|
||||||
|
|
||||||
defp calculate_screen_size(nil), do: nil
|
defp calculate_screen_size(nil), do: nil
|
||||||
defp calculate_screen_size(width) when width < 576, do: "Mobile"
|
defp calculate_screen_size(width) when width < 576, do: "Mobile"
|
||||||
|
@ -815,7 +815,9 @@ defmodule PlausibleWeb.Api.ExternalControllerTest do
|
|||||||
assert one.user_id != two.user_id
|
assert one.user_id != two.user_id
|
||||||
end
|
end
|
||||||
|
|
||||||
test "different hostname results in the same user ID when the root domain in the same", %{conn: conn} do
|
test "different hostname results in the same user ID when the root domain in the same", %{
|
||||||
|
conn: conn
|
||||||
|
} do
|
||||||
params = %{
|
params = %{
|
||||||
url: "https://user-id-test-domain.com/",
|
url: "https://user-id-test-domain.com/",
|
||||||
domain: "user-id-test-domain-6.com",
|
domain: "user-id-test-domain-6.com",
|
||||||
|
Loading…
Reference in New Issue
Block a user