fix redirects and search formatting
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
ci/woodpecker/pr/woodpecker Pipeline is pending

This commit is contained in:
FloatingGhost 2022-07-28 13:01:19 +01:00
parent 3ba6667654
commit 18cad411f7
2 changed files with 9 additions and 1 deletions

View file

@ -114,6 +114,7 @@ def call(conn = %{method: method}, url, opts) when method in @methods do
else
{:ok, true} ->
conn
|> put_private(:proxied_url, url)
|> error_or_redirect(500, "Request failed", opts)
|> halt()

View file

@ -37,6 +37,13 @@ defp to_es({:filter, [field, query]}) do
end
def parse(q) do
Enum.map(q, &to_es/1)
[
%{
exists: %{
field: "content"
}
}
] ++
Enum.map(q, &to_es/1)
end
end