mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
don't show hidden results
This commit is contained in:
parent
02f30391f6
commit
68472cf412
2 changed files with 2 additions and 2 deletions
|
@ -13,7 +13,7 @@ defmodule PhilomenaWeb.ImageController do
|
|||
images =
|
||||
Image.search_records(
|
||||
%{
|
||||
query: %{bool: %{must_not: query}},
|
||||
query: %{bool: %{must_not: [query, %{term: %{hidden_from_users: true}}]}},
|
||||
sort: %{created_at: :desc}
|
||||
},
|
||||
Image |> preload([:tags, :user])
|
||||
|
|
|
@ -14,7 +14,7 @@ defmodule PhilomenaWeb.SearchController do
|
|||
images =
|
||||
Image.search_records(
|
||||
%{
|
||||
query: %{bool: %{must: query, must_not: filter}},
|
||||
query: %{bool: %{must: query, must_not: [filter, %{term: %{hidden_from_users: true}}]}},
|
||||
sort: %{created_at: :desc}
|
||||
},
|
||||
Image |> preload(:tags)
|
||||
|
|
Loading…
Reference in a new issue