forked from shibao/cannery
credo fixes
This commit is contained in:
parent
c27c162562
commit
20f49a9a9a
@ -207,7 +207,6 @@ defmodule Cannery.Accounts do
|
|||||||
def deliver_update_email_instructions(user, current_email, update_email_url_fun)
|
def deliver_update_email_instructions(user, current_email, update_email_url_fun)
|
||||||
when is_function(update_email_url_fun, 1) do
|
when is_function(update_email_url_fun, 1) do
|
||||||
{encoded_token, user_token} = UserToken.build_email_token(user, "change:#{current_email}")
|
{encoded_token, user_token} = UserToken.build_email_token(user, "change:#{current_email}")
|
||||||
|
|
||||||
Repo.insert!(user_token)
|
Repo.insert!(user_token)
|
||||||
Mailer.deliver_update_email_instructions(user, update_email_url_fun.(encoded_token))
|
Mailer.deliver_update_email_instructions(user, update_email_url_fun.(encoded_token))
|
||||||
end
|
end
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
defmodule Cannery.EmailWorker do
|
defmodule Cannery.EmailWorker do
|
||||||
|
@moduledoc """
|
||||||
|
Oban worker that dispatches emails
|
||||||
|
"""
|
||||||
|
|
||||||
use Oban.Worker, queue: :mailers
|
use Oban.Worker, queue: :mailers
|
||||||
alias Cannery.Mailer
|
alias Cannery.Mailer
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ defmodule Cannery.Application do
|
|||||||
:ok
|
:ok
|
||||||
end
|
end
|
||||||
|
|
||||||
defp oban_config() do
|
defp oban_config do
|
||||||
Application.fetch_env!(:cannery, Oban)
|
Application.fetch_env!(:cannery, Oban)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -4,7 +4,7 @@ defmodule Cannery.Invites do
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import Ecto.Query, warn: false
|
import Ecto.Query, warn: false
|
||||||
alias Ecto.{Changeset}
|
alias Ecto.Changeset
|
||||||
alias Cannery.{Accounts.User, Invites.Invite, Repo}
|
alias Cannery.{Accounts.User, Invites.Invite, Repo}
|
||||||
|
|
||||||
@invite_token_length 20
|
@invite_token_length 20
|
||||||
|
@ -5,7 +5,7 @@ defmodule Cannery.Tags do
|
|||||||
|
|
||||||
import Ecto.Query, warn: false
|
import Ecto.Query, warn: false
|
||||||
alias Cannery.{Accounts.User, Repo, Tags.Tag}
|
alias Cannery.{Accounts.User, Repo, Tags.Tag}
|
||||||
alias Ecto.{Changeset}
|
alias Ecto.Changeset
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
Returns the list of tags.
|
Returns the list of tags.
|
||||||
|
@ -5,7 +5,7 @@ defmodule CanneryWeb.AmmoTypeLive.Show do
|
|||||||
|
|
||||||
use CanneryWeb, :live_view
|
use CanneryWeb, :live_view
|
||||||
import CanneryWeb.AmmoGroupLive.AmmoGroupCard
|
import CanneryWeb.AmmoGroupLive.AmmoGroupCard
|
||||||
alias Cannery.{Ammo}
|
alias Cannery.Ammo
|
||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
def mount(_params, session, socket) do
|
def mount(_params, session, socket) do
|
||||||
|
@ -5,8 +5,8 @@ defmodule CanneryWeb.ErrorHelpers do
|
|||||||
|
|
||||||
use Phoenix.HTML
|
use Phoenix.HTML
|
||||||
import Phoenix.LiveView.Helpers
|
import Phoenix.LiveView.Helpers
|
||||||
alias Phoenix.{HTML.Form, LiveView.Rendered}
|
|
||||||
alias Ecto.Changeset
|
alias Ecto.Changeset
|
||||||
|
alias Phoenix.{HTML.Form, LiveView.Rendered}
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
Generates tag for inlined form input errors.
|
Generates tag for inlined form input errors.
|
||||||
|
Loading…
Reference in New Issue
Block a user