debug /api/v1/suggestions
This commit is contained in:
parent
ec1ec32f20
commit
a418547bdf
@ -1169,7 +1169,15 @@ def suggestions(%{assigns: %{user: user}} = conn, _) do
|
|||||||
url = String.replace(api, "{{host}}", host) |> String.replace("{{user}}", user)
|
url = String.replace(api, "{{host}}", host) |> String.replace("{{user}}", user)
|
||||||
|
|
||||||
with {:ok, %{status: 200, body: body}} <-
|
with {:ok, %{status: 200, body: body}} <-
|
||||||
@httpoison.get(url, [], timeout: timeout, recv_timeout: timeout),
|
@httpoison.get(
|
||||||
|
url,
|
||||||
|
[],
|
||||||
|
follow_redirect: true,
|
||||||
|
adapter: [
|
||||||
|
timeout: timeout,
|
||||||
|
recv_timeout: timeout
|
||||||
|
]
|
||||||
|
),
|
||||||
{:ok, data} <- Jason.decode(body) do
|
{:ok, data} <- Jason.decode(body) do
|
||||||
data2 =
|
data2 =
|
||||||
Enum.slice(data, 0, limit)
|
Enum.slice(data, 0, limit)
|
||||||
|
Loading…
Reference in New Issue
Block a user