User: Add raw_bio, storing unformatted bio
[akkoma] / lib / pleroma / web / admin_api / views / report_view.ex
index 215e311008fc8c081e461cd8737066341cee8b1c..f432b8c2c9e20da80512dd5e823ebf6e190232a2 100644 (file)
@@ -10,9 +10,10 @@ defmodule Pleroma.Web.AdminAPI.ReportView do
   alias Pleroma.Web.AdminAPI
   alias Pleroma.Web.AdminAPI.Report
   alias Pleroma.Web.CommonAPI.Utils
-  alias Pleroma.Web.MastodonAPI
   alias Pleroma.Web.MastodonAPI.StatusView
 
+  defdelegate merge_account_views(user), to: AdminAPI.AccountView
+
   def render("index.json", %{reports: reports}) do
     %{
       reports:
@@ -71,11 +72,4 @@ defmodule Pleroma.Web.AdminAPI.ReportView do
       created_at: Utils.to_masto_date(inserted_at)
     }
   end
-
-  defp merge_account_views(%User{} = user) do
-    MastodonAPI.AccountView.render("show.json", %{user: user, skip_relationships: true})
-    |> Map.merge(AdminAPI.AccountView.render("show.json", %{user: user}))
-  end
-
-  defp merge_account_views(_), do: %{}
 end