Simplify geolix database config

pull/1398/head
Uku Taht 5 years ago
parent 2ca3baeafd
commit 950bd012d5

@ -386,7 +386,8 @@ if config_env() != :test && geolite2_country_db do
%{
id: :country,
adapter: Geolix.Adapter.MMDB2,
source: geolite2_country_db
source: geolite2_country_db,
result_as: :raw
}
]
end

@ -194,9 +194,7 @@ defmodule PlausibleWeb.Api.ExternalController do
PlausibleWeb.RemoteIp.get(conn)
|> Geolix.lookup()
if result && result[:country] && result[:country].country do
result[:country].country.iso_code
end
get_in(result, [:country, :country, :iso_code])
end
defp parse_referrer(_, nil), do: nil

Loading…
Cancel
Save