filter fixes

This commit is contained in:
byte[] 2020-06-06 21:56:07 -04:00
parent 9294e54771
commit 417305e43c
3 changed files with 3 additions and 3 deletions

View file

@ -22,7 +22,7 @@ defmodule PhilomenaWeb.Admin.User.ForceFilterController do
end end
def delete(conn, _params) do def delete(conn, _params) do
{:ok, user} = Users.unforce_filter(conn.assigns.current_user) {:ok, user} = Users.unforce_filter(conn.assigns.user)
conn conn
|> put_flash(:info, "Forced filter was removed.") |> put_flash(:info, "Forced filter was removed.")

View file

@ -14,7 +14,7 @@ defmodule PhilomenaWeb.ImageFilterPlug do
filter = defaults(conn.assigns[:current_filter]) filter = defaults(conn.assigns[:current_filter])
forced = defaults(conn.assigns[:forced_filter]) forced = defaults(conn.assigns[:forced_filter])
tag_exclusion = %{terms: %{tag_ids: filter.hidden_tag_ids}} tag_exclusion = %{terms: %{tag_ids: filter.hidden_tag_ids ++ forced.hidden_tag_ids}}
query_spoiler = invalid_filter_guard(user, filter.spoilered_complex_str) query_spoiler = invalid_filter_guard(user, filter.spoilered_complex_str)
query_exclusion = %{ query_exclusion = %{
bool: %{ bool: %{

View file

@ -16,7 +16,7 @@
br br
i.fa.fa-fw.fa-filter> i.fa.fa-fw.fa-filter>
strong.comment_deleted> Forced Filter: strong.comment_deleted> Forced Filter:
= link @forced.name, to: Routes.filter_path(@conn, :show, @filter) = link @forced.name, to: Routes.filter_path(@conn, :show, @forced)
br br
i.far.fa-fw.fa-clock> i.far.fa-fw.fa-clock>