X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fadmin_api%2Fviews%2Freport_view.ex;h=f432b8c2c9e20da80512dd5e823ebf6e190232a2;hb=6dd1575c64ccc2ffe82155f70935b2aa58d22684;hp=215e311008fc8c081e461cd8737066341cee8b1c;hpb=b2924ab1fbba4e6add15030cf8444d2d3f0cfe0c;p=akkoma diff --git a/lib/pleroma/web/admin_api/views/report_view.ex b/lib/pleroma/web/admin_api/views/report_view.ex index 215e31100..f432b8c2c 100644 --- a/lib/pleroma/web/admin_api/views/report_view.ex +++ b/lib/pleroma/web/admin_api/views/report_view.ex @@ -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