Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
daveminer committed Oct 27, 2024
1 parent 80a9ccf commit a1bd802
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion lib/basket/club_member.ex
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
defmodule Basket.ClubMember do
@moduledoc false

use Ecto.Schema
import Ecto.Changeset

alias Basket.{User, Club}
alias Basket.{Club, User}

schema "club_members" do
belongs_to :user, User
4 changes: 3 additions & 1 deletion lib/basket/club_officer.ex
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
defmodule Basket.ClubOfficer do
@moduledoc false

use Ecto.Schema
import Ecto.Changeset

alias Basket.{User, Club}
alias Basket.{Club, User}

schema "club_officers" do
belongs_to :user, User
Original file line number Diff line number Diff line change
@@ -59,14 +59,13 @@ defmodule BasketWeb.PowInvitation.InvitationController do
end

defp format_changeset_errors(changeset) do
Enum.map(changeset.errors, fn
Enum.map_join(changeset.errors, ", ", fn
{:email, {"has already been taken", _}} ->
"That email address has already been invited."

{field, {message, _}} ->
"#{humanize(field)} #{message}"
end)
|> Enum.join(", ")
end

defp humanize(field) do
3 changes: 1 addition & 2 deletions test/basket_web/controllers/invitation_controller_test.exs
Original file line number Diff line number Diff line change
@@ -3,8 +3,7 @@ defmodule BasketWeb.PowInvitation.InvitationControllerTest do

import Phoenix.VerifiedRoutes

alias Basket.{Repo, User}
alias Basket.Factory
alias Basket.{Factory, Repo, User}

setup do
# Create an inviting user with an office

0 comments on commit a1bd802

Please sign in to comment.