diff --git a/lib/cannery/accounts.ex b/lib/cannery/accounts.ex index bf3899c..95da0c6 100644 --- a/lib/cannery/accounts.ex +++ b/lib/cannery/accounts.ex @@ -218,7 +218,7 @@ defmodule Cannery.Accounts do with {:ok, query} <- UserToken.verify_change_email_token_query(token, context), %UserToken{sent_to: email} <- Repo.one(query), - {:ok, _} <- Repo.transaction(user_email_multi(user, email, context)) do + {:ok, _result} <- Repo.transaction(user_email_multi(user, email, context)) do :ok else _error_tuple -> :error diff --git a/lib/cannery/accounts/user.ex b/lib/cannery/accounts/user.ex index 18e77ff..26ce1e9 100644 --- a/lib/cannery/accounts/user.ex +++ b/lib/cannery/accounts/user.ex @@ -136,7 +136,7 @@ defmodule Cannery.Accounts.User do |> cast(attrs, [:email]) |> validate_email() |> case do - %{changes: %{email: _}} = changeset -> changeset + %{changes: %{email: _email}} = changeset -> changeset %{} = changeset -> add_error(changeset, :email, dgettext("errors", "did not change")) end end diff --git a/lib/cannery/accounts/user_token.ex b/lib/cannery/accounts/user_token.ex index 89c03c2..3c5972a 100644 --- a/lib/cannery/accounts/user_token.ex +++ b/lib/cannery/accounts/user_token.ex @@ -150,7 +150,7 @@ defmodule Cannery.Accounts.UserToken do from t in __MODULE__, where: t.user_id == ^user.id end - def user_and_contexts_query(user, [_ | _] = contexts) do + def user_and_contexts_query(user, [_first | _rest] = contexts) do from t in __MODULE__, where: t.user_id == ^user.id and t.context in ^contexts end end diff --git a/lib/cannery_web/controllers/user_reset_password_controller.ex b/lib/cannery_web/controllers/user_reset_password_controller.ex index 00ced36..80a620b 100644 --- a/lib/cannery_web/controllers/user_reset_password_controller.ex +++ b/lib/cannery_web/controllers/user_reset_password_controller.ex @@ -40,7 +40,7 @@ defmodule CanneryWeb.UserResetPasswordController do # leaked token giving the user access to the account. def update(conn, %{"user" => user_params}) do case Accounts.reset_user_password(conn.assigns.user, user_params) do - {:ok, _} -> + {:ok, _socket} -> conn |> put_flash(:info, dgettext("prompts", "Password reset successfully.")) |> redirect(to: ~p"/users/log_in") diff --git a/lib/cannery_web/live/pack_live/show.ex b/lib/cannery_web/live/pack_live/show.ex index af837f5..89fd6bb 100644 --- a/lib/cannery_web/live/pack_live/show.ex +++ b/lib/cannery_web/live/pack_live/show.ex @@ -72,7 +72,7 @@ defmodule CanneryWeb.PackLive.Show do %{"id" => id}, %{assigns: %{pack: %{id: pack_id}, current_user: current_user}} = socket ) do - {:ok, _} = + {:ok, _shot_record} = ActivityLog.get_shot_record!(id, current_user) |> ActivityLog.delete_shot_record(current_user) @@ -136,7 +136,7 @@ defmodule CanneryWeb.PackLive.Show do :actions -> ~H""" -