From fbcca230579e376787bdebc93e00e1bce1a95b23 Mon Sep 17 00:00:00 2001 From: Laurent GAY Date: Wed, 22 Jan 2025 16:18:45 +0100 Subject: [PATCH] #1629: remove GeoIP for default location --- lib/graphql/resolvers/config.ex | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/lib/graphql/resolvers/config.ex b/lib/graphql/resolvers/config.ex index 10f90849d..6e4b2d7a3 100644 --- a/lib/graphql/resolvers/config.ex +++ b/lib/graphql/resolvers/config.ex @@ -14,22 +14,8 @@ defmodule Mobilizon.GraphQL.Resolvers.Config do Gets config. """ @spec get_config(any(), map(), Absinthe.Resolution.t()) :: {:ok, map()} - def get_config(_parent, _params, %{context: %{ip: ip}}) do - geolix = Geolix.lookup(ip) - - country_code = - case Map.get(geolix, :city) do - %{country: %{iso_code: country_code}} -> String.downcase(country_code) - _ -> nil - end - - location = - case Map.get(geolix, :city) do - %{location: location} -> location - _ -> nil - end - - data = Map.merge(config_cache(), %{location: location, country_code: country_code}) + def get_config(_parent, _params, %{context: %{}}) do + data = Map.merge(config_cache(), %{}) {:ok, data} end