diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2020-08-25 18:51:09 +0400 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2020-10-07 18:34:27 +0400 |
commit | c01a81804835fb92c145b90e3a264c5d4cf9c886 (patch) | |
tree | 87eaf4e6ef009a2b952d16489b1ea381cea44c35 /lib | |
parent | 9d564ffc2988f145bc9cf26477eea93b1bf01cb0 (diff) | |
download | pleroma-c01a81804835fb92c145b90e3a264c5d4cf9c886.tar.gz |
Add tests
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/export.ex | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/pleroma/export.ex b/lib/pleroma/export.ex index f0f1ef093..45b8ce749 100644 --- a/lib/pleroma/export.ex +++ b/lib/pleroma/export.ex @@ -26,7 +26,7 @@ defmodule Pleroma.Export do end end - def actor(dir, user) do + defp actor(dir, user) do with {:ok, json} <- UserView.render("user.json", %{user: user}) |> Map.merge(%{"likes" => "likes.json", "bookmarks" => "bookmarks.json"}) @@ -82,7 +82,7 @@ defmodule Pleroma.Export do end end - def bookmarks(dir, %{id: user_id} = _user) do + defp bookmarks(dir, %{id: user_id} = _user) do Bookmark |> where(user_id: ^user_id) |> join(:inner, [b], activity in assoc(b, :activity)) @@ -90,7 +90,7 @@ defmodule Pleroma.Export do |> write(dir, "bookmarks", fn a -> {:ok, "\"#{a.object}\""} end) end - def likes(dir, user) do + defp likes(dir, user) do user.ap_id |> Activity.Queries.by_actor() |> Activity.Queries.by_type("Like") @@ -98,7 +98,7 @@ defmodule Pleroma.Export do |> write(dir, "likes", fn a -> {:ok, "\"#{a.object}\""} end) end - def statuses(dir, user) do + defp statuses(dir, user) do opts = %{} |> Map.put(:type, ["Create", "Announce"]) |