diff --git a/lib/cannery/accounts.ex b/lib/cannery/accounts.ex index ba31af4..9d0af06 100644 --- a/lib/cannery/accounts.ex +++ b/lib/cannery/accounts.ex @@ -207,7 +207,6 @@ defmodule Cannery.Accounts do def deliver_update_email_instructions(user, current_email, update_email_url_fun) when is_function(update_email_url_fun, 1) do {encoded_token, user_token} = UserToken.build_email_token(user, "change:#{current_email}") - Repo.insert!(user_token) Mailer.deliver_update_email_instructions(user, update_email_url_fun.(encoded_token)) end diff --git a/lib/cannery/accounts/email_worker.ex b/lib/cannery/accounts/email_worker.ex index 5198c71..7345dac 100644 --- a/lib/cannery/accounts/email_worker.ex +++ b/lib/cannery/accounts/email_worker.ex @@ -1,4 +1,8 @@ defmodule Cannery.EmailWorker do + @moduledoc """ + Oban worker that dispatches emails + """ + use Oban.Worker, queue: :mailers alias Cannery.Mailer diff --git a/lib/cannery/application.ex b/lib/cannery/application.ex index 82c2d11..7bf0b90 100644 --- a/lib/cannery/application.ex +++ b/lib/cannery/application.ex @@ -42,7 +42,7 @@ defmodule Cannery.Application do :ok end - defp oban_config() do + defp oban_config do Application.fetch_env!(:cannery, Oban) end end diff --git a/lib/cannery/invites.ex b/lib/cannery/invites.ex index 45033c7..bd6e034 100644 --- a/lib/cannery/invites.ex +++ b/lib/cannery/invites.ex @@ -4,7 +4,7 @@ defmodule Cannery.Invites do """ import Ecto.Query, warn: false - alias Ecto.{Changeset} + alias Ecto.Changeset alias Cannery.{Accounts.User, Invites.Invite, Repo} @invite_token_length 20 diff --git a/lib/cannery/tags.ex b/lib/cannery/tags.ex index 8ee6cee..ed606b5 100644 --- a/lib/cannery/tags.ex +++ b/lib/cannery/tags.ex @@ -5,7 +5,7 @@ defmodule Cannery.Tags do import Ecto.Query, warn: false alias Cannery.{Accounts.User, Repo, Tags.Tag} - alias Ecto.{Changeset} + alias Ecto.Changeset @doc """ Returns the list of tags. diff --git a/lib/cannery_web/live/ammo_type_live/show.ex b/lib/cannery_web/live/ammo_type_live/show.ex index 9d6edda..ec0f608 100644 --- a/lib/cannery_web/live/ammo_type_live/show.ex +++ b/lib/cannery_web/live/ammo_type_live/show.ex @@ -5,7 +5,7 @@ defmodule CanneryWeb.AmmoTypeLive.Show do use CanneryWeb, :live_view import CanneryWeb.AmmoGroupLive.AmmoGroupCard - alias Cannery.{Ammo} + alias Cannery.Ammo @impl true def mount(_params, session, socket) do diff --git a/lib/cannery_web/views/error_helpers.ex b/lib/cannery_web/views/error_helpers.ex index 191fd50..e48cbdd 100644 --- a/lib/cannery_web/views/error_helpers.ex +++ b/lib/cannery_web/views/error_helpers.ex @@ -5,8 +5,8 @@ defmodule CanneryWeb.ErrorHelpers do use Phoenix.HTML import Phoenix.LiveView.Helpers - alias Phoenix.{HTML.Form, LiveView.Rendered} alias Ecto.Changeset + alias Phoenix.{HTML.Form, LiveView.Rendered} @doc """ Generates tag for inlined form input errors.