misc fixes

This commit is contained in:
byte[] 2019-12-13 13:52:57 -05:00
parent 304d5486d6
commit 642ded69a5
2 changed files with 1 additions and 3 deletions

View file

@ -10,8 +10,6 @@ defmodule PhilomenaWeb.Admin.SubnetBanController do
plug :load_resource, model: SubnetBan, only: [:edit, :update, :delete] plug :load_resource, model: SubnetBan, only: [:edit, :update, :delete]
def index(conn, %{"q" => q}) when is_binary(q) do def index(conn, %{"q" => q}) when is_binary(q) do
like_q = "%#{q}%"
SubnetBan SubnetBan
|> where([sb], |> where([sb],
sb.generated_ban_id == ^q sb.generated_ban_id == ^q

View file

@ -62,7 +62,7 @@ defmodule PhilomenaWeb.ReportView do
def link_to_reported_thing(conn, %User{} = r), def link_to_reported_thing(conn, %User{} = r),
do: link "User '#{r.name}'", to: Routes.profile_path(conn, :show, r) do: link "User '#{r.name}'", to: Routes.profile_path(conn, :show, r)
def link_to_reported_thing(_conn, report) do def link_to_reported_thing(_conn, _reportable) do
"Reported item permanently destroyed." "Reported item permanently destroyed."
end end
end end