mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-19 22:27:59 +01:00
fix random endpoint and ensure search_records/4 is the only search_records exported
This commit is contained in:
parent
398721a75f
commit
1990e384da
2 changed files with 3 additions and 2 deletions
|
@ -127,7 +127,7 @@ defmodule Philomena.Elasticsearch do
|
|||
}
|
||||
end
|
||||
|
||||
def search_records(module, elastic_query, pagination_params \\ %{}, ecto_query) do
|
||||
def search_records(module, elastic_query, pagination_params, ecto_query) do
|
||||
page = search_results(module, elastic_query, pagination_params)
|
||||
ids = page.entries
|
||||
|
||||
|
|
|
@ -45,7 +45,8 @@ defmodule PhilomenaWeb.Image.RandomController do
|
|||
},
|
||||
sort: sort.sorts
|
||||
},
|
||||
%{page_size: 1}
|
||||
%{page_size: 1},
|
||||
Image
|
||||
)
|
||||
|> Enum.to_list()
|
||||
|> unwrap()
|
||||
|
|
Loading…
Reference in a new issue