fix random endpoint and ensure search_records/4 is the only search_records exported

This commit is contained in:
byte[] 2019-12-24 18:09:35 -05:00
parent 398721a75f
commit 1990e384da
2 changed files with 3 additions and 2 deletions

View file

@ -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

View file

@ -45,7 +45,8 @@ defmodule PhilomenaWeb.Image.RandomController do
},
sort: sort.sorts
},
%{page_size: 1}
%{page_size: 1},
Image
)
|> Enum.to_list()
|> unwrap()