Work around Addresses to bring them properly through GraphQL
Got caught with https://github.com/absinthe-graphql/absinthe/issues/601 at some point, that's why fields are renamed Fix tests Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -96,14 +96,14 @@ defmodule Mobilizon.Service.Geospatial.GoogleMaps do
|
||||
end)
|
||||
|
||||
%Address{
|
||||
addressCountry: Map.get(components, "country"),
|
||||
addressLocality: Map.get(components, "locality"),
|
||||
addressRegion: Map.get(components, "administrative_area_level_1"),
|
||||
country: Map.get(components, "country"),
|
||||
locality: Map.get(components, "locality"),
|
||||
region: Map.get(components, "administrative_area_level_1"),
|
||||
description: description,
|
||||
floor: nil,
|
||||
geom: [lon, lat] |> Provider.coordinates(),
|
||||
postalCode: Map.get(components, "postal_code"),
|
||||
streetAddress: street_address(components)
|
||||
postal_code: Map.get(components, "postal_code"),
|
||||
street: street_address(components)
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user