Add option to modify HTTP pool size
[akkoma] / priv / repo / migrations / 20200716195806_autolinker_to_linkify.exs
index 9ec4203eb97dd543a1443b459dbb5cfcbd88f52a..570acba8404ca9b5f4b8947ccd01165053284068 100644 (file)
@@ -1,7 +1,5 @@
 defmodule Pleroma.Repo.Migrations.AutolinkerToLinkify do
   use Ecto.Migration
-
-  alias Pleroma.Repo
   alias Pleroma.ConfigDB
 
   @autolinker_path %{group: :auto_linker, key: :opts}
@@ -23,15 +21,16 @@ defmodule Pleroma.Repo.Migrations.AutolinkerToLinkify do
 
   defp maybe_get_params() do
     with %ConfigDB{value: opts} <- ConfigDB.get_by_params(@autolinker_path),
-         %{} = opts <- transform_opts(opts),
+         opts <- transform_opts(opts),
          %{} = linkify_params <- Map.put(@linkify_path, :value, opts) do
       {:ok, {@autolinker_path, linkify_params}}
     end
   end
 
-  defp transform_opts(opts) when is_list(opts) do
+  def transform_opts(opts) when is_list(opts) do
     opts
     |> Enum.into(%{})
     |> Map.take(@compat_opts)
+    |> Map.to_list()
   end
 end