credo fixes

This commit is contained in:
shibao 2022-02-08 22:12:22 -05:00
parent c27c162562
commit 20f49a9a9a
7 changed files with 9 additions and 6 deletions

View File

@ -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

View File

@ -1,4 +1,8 @@
defmodule Cannery.EmailWorker do
@moduledoc """
Oban worker that dispatches emails
"""
use Oban.Worker, queue: :mailers
alias Cannery.Mailer

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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.