mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
prefix unused vars
This commit is contained in:
parent
fbb35d3b3a
commit
b655654acb
4 changed files with 5 additions and 6 deletions
|
@ -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)
|
||||
|
|
|
@ -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: "/"
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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, ""] ->
|
||||
|
|
Loading…
Reference in a new issue