Run mix format on Elixir 12

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-06-07 16:39:44 +02:00
parent 95913ba28b
commit a336e76aae
20 changed files with 52 additions and 180 deletions

View File

@@ -35,9 +35,7 @@ defmodule Mobilizon.Service.Geospatial.MapQuest do
with {:ok, %{status: 200, body: body}} <-
GeospatialClient.get(
"https://#{prefix}.mapquestapi.com/geocoding/v1/reverse?key=#{api_key}&location=#{
lat
},#{lon}&maxResults=#{limit}"
"https://#{prefix}.mapquestapi.com/geocoding/v1/reverse?key=#{api_key}&location=#{lat},#{lon}&maxResults=#{limit}"
),
%{"results" => results, "info" => %{"statuscode" => 0}} <- body do
results |> Enum.map(&process_data/1)
@@ -63,9 +61,7 @@ defmodule Mobilizon.Service.Geospatial.MapQuest do
if is_nil(api_key), do: raise(ArgumentError, message: @api_key_missing_message)
url =
"https://#{prefix}.mapquestapi.com/geocoding/v1/address?key=#{api_key}&location=#{
URI.encode(q)
}&maxResults=#{limit}"
"https://#{prefix}.mapquestapi.com/geocoding/v1/address?key=#{api_key}&location=#{URI.encode(q)}&maxResults=#{limit}"
Logger.debug("Asking MapQuest for addresses with #{url}")

View File

@@ -42,14 +42,10 @@ defmodule Mobilizon.Service.Geospatial.Nominatim do
url =
case method do
:search ->
"#{endpoint}/search?format=geocodejson&q=#{URI.encode(args.q)}&limit=#{limit}&accept-language=#{
lang
}&addressdetails=1&namedetails=1"
"#{endpoint}/search?format=geocodejson&q=#{URI.encode(args.q)}&limit=#{limit}&accept-language=#{lang}&addressdetails=1&namedetails=1"
:geocode ->
"#{endpoint}/reverse?format=geocodejson&lat=#{args.lat}&lon=#{args.lon}&accept-language=#{
lang
}&addressdetails=1&namedetails=1"
"#{endpoint}/reverse?format=geocodejson&lat=#{args.lat}&lon=#{args.lon}&accept-language=#{lang}&addressdetails=1&namedetails=1"
|> add_parameter(options, :zoom)
end

View File

@@ -93,9 +93,7 @@ defmodule Mobilizon.Service.Notifications.Scheduler do
%DateTime{} = begins_on_shifted = shift_zone(begins_on, timezone)
Logger.debug(
"Participation event start at #{inspect(begins_on_shifted)} (user timezone is #{
timezone
})"
"Participation event start at #{inspect(begins_on_shifted)} (user timezone is #{timezone})"
)
notification_date =