prefix unused vars

This commit is contained in:
Luna D 2022-03-24 18:36:49 +01:00
parent fbb35d3b3a
commit b655654acb
No known key found for this signature in database
GPG key ID: 4B1C63448394F688
4 changed files with 5 additions and 6 deletions

View file

@ -153,9 +153,9 @@ defmodule Philomena.Images do
end
end
defp maybe_approve_image(image, nil), do: false
defp maybe_approve_image(_image, nil), do: false
defp maybe_approve_image(image, %User{verified: false, role: role}) when role == "user",
defp maybe_approve_image(_image, %User{verified: false, role: role}) when role == "user",
do: false
defp maybe_approve_image(image, _user), do: approve_image(image)

View file

@ -14,7 +14,6 @@ defmodule PhilomenaWeb.Conversation.Message.ApproveController do
def create(conn, _params) do
message = conn.assigns.message
user = conn.assigns.current_user
{:ok, _message} = Conversations.approve_conversation_message(message)
@ -24,7 +23,7 @@ defmodule PhilomenaWeb.Conversation.Message.ApproveController do
|> redirect(to: "/")
end
defp log_details(conn, _action, message) do
defp log_details(_conn, _action, message) do
%{
body: "Approved private message in conversation ##{message.conversation_id}",
subject_path: "/"

View file

@ -38,7 +38,7 @@ defmodule PhilomenaWeb.Topic.Post.ApproveController do
end
end
defp log_details(conn, action, post) do
defp log_details(conn, _action, post) do
%{
body: "Approved forum post ##{post.id} in topic '#{post.topic.title}'",
subject_path:

View file

@ -102,7 +102,7 @@ defmodule PhilomenaWeb.MarkdownRenderer do
)
|> safe_to_string()
[id, suffix] when not img.approved ->
[_id, suffix] when not img.approved ->
">>#{img.id}#{suffix}#{link_suffix(img)}"
[_id, ""] ->