forked from YokaiRick/akkoma
Allow uploading a file for follow import.
This commit is contained in:
parent
39ccfdc084
commit
d89193a8d7
1 changed files with 3 additions and 0 deletions
|
@ -74,6 +74,9 @@ def emoji(conn, _params) do
|
||||||
json conn, Enum.into(Formatter.get_custom_emoji(), %{})
|
json conn, Enum.into(Formatter.get_custom_emoji(), %{})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def follow_import(conn, %{"list" => %Plug.Upload{} = listfile}) do
|
||||||
|
follow_import(conn, %{"list" => File.read!(listfile.path)})
|
||||||
|
end
|
||||||
def follow_import(%{assigns: %{user: user}} = conn, %{"list" => list}) do
|
def follow_import(%{assigns: %{user: user}} = conn, %{"list" => list}) do
|
||||||
errors = list
|
errors = list
|
||||||
|> String.split()
|
|> String.split()
|
||||||
|
|
Loading…
Reference in a new issue