     team = get_team(id)
 
     changeset = Team.admin_changeset(team, %{accepted: true}, Repo)
+    |> email_if_accepted(team)
 
     case Repo.update(changeset) do
       {:ok, team} ->

  alias Api.{Mailer, Repo}
  alias Api.Accounts.User
  alias Api.Competitions
  alias Api.Teams.{Invite, Membership, Team}
  alias Api.Notifications.Emails
  alias Ecto.{Changeset}


    Team.admin_changeset(team, team_params, Repo)
    |> email_if_applying(team)
    |> email_if_accepted(team)
    |> Repo.update
  end

