Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma into develop
[akkoma] / lib / pleroma / web / admin_api / controllers / admin_api_controller.ex
index 839ac1a8d9185381f56cc84ff14122da63cfb899..50aa294f0ff0aed48ac6089323a47a4a6e2353b7 100644 (file)
@@ -49,7 +49,7 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIController do
   plug(
     OAuthScopesPlug,
     %{scopes: ["admin:read:statuses"]}
-    when action in [:list_user_statuses, :list_instance_statuses]
+    when action in [:list_user_statuses]
   )
 
   plug(
@@ -81,24 +81,6 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIController do
 
   action_fallback(AdminAPI.FallbackController)
 
-  def list_instance_statuses(conn, %{"instance" => instance} = params) do
-    with_reblogs = params["with_reblogs"] == "true" || params["with_reblogs"] == true
-    {page, page_size} = page_params(params)
-
-    result =
-      ActivityPub.fetch_statuses(nil, %{
-        instance: instance,
-        limit: page_size,
-        offset: (page - 1) * page_size,
-        exclude_reblogs: not with_reblogs,
-        total: true
-      })
-
-    conn
-    |> put_view(AdminAPI.StatusView)
-    |> render("index.json", %{total: result[:total], activities: result[:items], as: :activity})
-  end
-
   def list_user_statuses(%{assigns: %{user: admin}} = conn, %{"nickname" => nickname} = params) do
     with_reblogs = params["with_reblogs"] == "true" || params["with_reblogs"] == true
     godmode = params["godmode"] == "true" || params["godmode"] == true