Remove credo and use mix format, and lint everything

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2018-07-27 10:45:35 +02:00
parent df3f08c528
commit 979aad5acb
104 changed files with 2278 additions and 1487 deletions

View File

@@ -8,16 +8,16 @@ defmodule Eventos.Addresses.Address do
alias Eventos.Groups.Group
schema "addresses" do
field :addressCountry, :string
field :addressLocality, :string
field :addressRegion, :string
field :description, :string
field :floor, :string
field :geom, Geo.Geometry
field :postalCode, :string
field :streetAddress, :string
has_one :event, Event
has_one :group, Group
field(:addressCountry, :string)
field(:addressLocality, :string)
field(:addressRegion, :string)
field(:description, :string)
field(:floor, :string)
field(:geom, Geo.Geometry)
field(:postalCode, :string)
field(:streetAddress, :string)
has_one(:event, Event)
has_one(:group, Group)
timestamps()
end
@@ -25,6 +25,15 @@ defmodule Eventos.Addresses.Address do
@doc false
def changeset(%Address{} = address, attrs) do
address
|> cast(attrs, [:description, :floor, :geom, :addressCountry, :addressLocality, :addressRegion, :postalCode, :streetAddress])
|> cast(attrs, [
:description,
:floor,
:geom,
:addressCountry,
:addressLocality,
:addressRegion,
:postalCode,
:streetAddress
])
end
end

View File

@@ -116,7 +116,7 @@ defmodule Eventos.Addresses do
String.to_existing_atom(type_input)
rescue
e in ArgumentError ->
Logger.error("#{type_input} is not an existing atom : #{inspect e}")
Logger.error("#{type_input} is not an existing atom : #{inspect(e)}")
nil
end
else