fix credo
This commit is contained in:
@ -44,7 +44,7 @@ defmodule CanneryWeb.AmmoGroupLive.Show do
|
||||
@impl true
|
||||
def handle_event(
|
||||
"delete",
|
||||
_,
|
||||
_params,
|
||||
%{assigns: %{ammo_group: ammo_group, current_user: current_user}} = socket
|
||||
) do
|
||||
ammo_group |> Ammo.delete_ammo_group!(current_user)
|
||||
@ -58,7 +58,7 @@ defmodule CanneryWeb.AmmoGroupLive.Show do
|
||||
@impl true
|
||||
def handle_event(
|
||||
"toggle_staged",
|
||||
_,
|
||||
_params,
|
||||
%{assigns: %{ammo_group: ammo_group, current_user: current_user}} = socket
|
||||
) do
|
||||
{:ok, ammo_group} =
|
||||
|
@ -14,7 +14,7 @@ defmodule CanneryWeb.AmmoTypeLive.Show do
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_params(%{"id" => id}, _, %{assigns: %{current_user: current_user}} = socket) do
|
||||
def handle_params(%{"id" => id}, _params, %{assigns: %{current_user: current_user}} = socket) do
|
||||
ammo_type = Ammo.get_ammo_type!(id, current_user)
|
||||
|
||||
socket =
|
||||
@ -32,7 +32,7 @@ defmodule CanneryWeb.AmmoTypeLive.Show do
|
||||
@impl true
|
||||
def handle_event(
|
||||
"delete",
|
||||
_,
|
||||
_params,
|
||||
%{assigns: %{ammo_type: ammo_type, current_user: current_user}} = socket
|
||||
) do
|
||||
%{name: ammo_type_name} = ammo_type |> Ammo.delete_ammo_type!(current_user)
|
||||
|
@ -18,7 +18,7 @@ defmodule CanneryWeb.ContainerLive.Show do
|
||||
@impl true
|
||||
def handle_params(
|
||||
%{"id" => id},
|
||||
_,
|
||||
_session,
|
||||
%{assigns: %{current_user: current_user}} = socket
|
||||
) do
|
||||
{:noreply, socket |> render_container(id, current_user)}
|
||||
@ -53,7 +53,7 @@ defmodule CanneryWeb.ContainerLive.Show do
|
||||
@impl true
|
||||
def handle_event(
|
||||
"delete_container",
|
||||
_,
|
||||
_params,
|
||||
%{assigns: %{container: container, current_user: current_user}} = socket
|
||||
) do
|
||||
socket =
|
||||
|
@ -29,7 +29,7 @@ defmodule CanneryWeb.HomeLive do
|
||||
%{^query => vsn} ->
|
||||
{:noreply, redirect(socket, external: "https://hexdocs.pm/#{query}/#{vsn}")}
|
||||
|
||||
_ ->
|
||||
_no_query ->
|
||||
{:noreply,
|
||||
socket
|
||||
|> put_flash(:error, "No dependencies found matching \"#{query}\"")
|
||||
|
@ -119,7 +119,7 @@ defmodule CanneryWeb.InviteLive.Index do
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_event("copy_to_clipboard", _, socket) do
|
||||
def handle_event("copy_to_clipboard", _params, socket) do
|
||||
prompt = dgettext("prompts", "Copied to clipboard")
|
||||
{:noreply, socket |> put_flash(:info, prompt)}
|
||||
end
|
||||
|
@ -2,7 +2,6 @@ defmodule CanneryWeb.EmailView do
|
||||
@moduledoc """
|
||||
A view for email-related helper functions
|
||||
"""
|
||||
alias CanneryWeb.{Endpoint, HomeLive}
|
||||
|
||||
use CanneryWeb, :view
|
||||
alias CanneryWeb.{Endpoint, HomeLive}
|
||||
end
|
||||
|
@ -8,7 +8,7 @@ defmodule CanneryWeb.ErrorView do
|
||||
case error_path do
|
||||
"404.html" -> dgettext("errors", "Not found")
|
||||
"401.html" -> dgettext("errors", "Unauthorized")
|
||||
_ -> dgettext("errors", "Internal Server Error")
|
||||
_other_template -> dgettext("errors", "Internal Server Error")
|
||||
end
|
||||
|
||||
render("error.html", %{error_string: error_string})
|
||||
|
Reference in New Issue
Block a user