Skip to content

Commit

Permalink
fix: That's not how you get item via index in Elixir apparently
Browse files Browse the repository at this point in the history
  • Loading branch information
null2264 committed Oct 13, 2023
1 parent 6549ba9 commit 3774183
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pleroma/akkoma/translators/voldy.ex
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ defmodule Pleroma.Akkoma.Translators.Voldy do
with {:ok, %{status: 200} = response} <- do_request(string, from_language, to_language),
{:ok, body} <- Jason.decode(response.body) do

{:ok, body[2], body[0][0][1]}
{:ok, Enum.at(body, 2), Enum.at(Enum.at(Enum.at(body, 0), 0), 1)}
else
{:ok, %{status: status} = response} ->
Logger.warning("Voldy: Request rejected: #{inspect(response)}")
Expand Down

0 comments on commit 3774183

Please sign in to comment.