Commit 70dfbd99 authored by Francis Dinh's avatar Francis Dinh

mix format

parent b66b8f66
Pipeline #10668 passed with stages
in 6 minutes and 1 second
......@@ -305,7 +305,10 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do
def follow_import(%{assigns: %{user: follower}} = conn, %{"list" => list}) do
with lines <- String.split(list, "\n"),
followed_identifiers <- Enum.map(lines, fn line -> String.split(line, ",") |> List.delete("Account address") end),
followed_identifiers <-
Enum.map(lines, fn line ->
String.split(line, ",") |> List.delete("Account address")
end),
{:ok, _} = Task.start(fn -> User.follow_import(follower, followed_identifiers) end) do
json(conn, "job started")
end
......
......@@ -33,7 +33,9 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do
response =
conn
|> assign(:user, user1)
|> post("/api/pleroma/follow_import", %{"list" => "Account address,Show boosts\n#{user2.ap_id},true"})
|> post("/api/pleroma/follow_import", %{
"list" => "Account address,Show boosts\n#{user2.ap_id},true"
})
|> json_response(:ok)
assert response == "job started"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment