Fix geospatial runtime configuration

Geospatial configuration was only evaluated at compile-time, not at
runtime

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-03-16 15:33:44 +01:00
parent ad913eb131
commit 35e641bcff
8 changed files with 43 additions and 35 deletions

View File

@@ -80,4 +80,9 @@ defmodule Mobilizon.Service.Geospatial.Provider do
@spec coordinates(any) :: nil
def coordinates(_, _), do: nil
@spec endpoint(atom()) :: String.t()
def endpoint(provider) do
Application.get_env(:mobilizon, provider) |> get_in([:endpoint])
end
end