Partially restore `/api/statusnet/config.json`
[akkoma] / lib / pleroma / web / router.ex
index 980242c687f030904cae5ab5203b02a9b936182a..322b074c2d2d9c935a07d3cc51a787a3e6e19e89 100644 (file)
@@ -481,11 +481,10 @@ defmodule Pleroma.Web.Router do
   scope "/api", Pleroma.Web do
     pipe_through(:config)
 
-    get("/help/test", TwitterAPI.UtilController, :help_test)
-    post("/help/test", TwitterAPI.UtilController, :help_test)
-    get("/statusnet/config", TwitterAPI.UtilController, :config)
-    get("/statusnet/version", TwitterAPI.UtilController, :version)
     get("/pleroma/frontend_configurations", TwitterAPI.UtilController, :frontend_configurations)
+
+    # Deprecated
+    get("/statusnet/config", TwitterAPI.UtilController, :config)
   end
 
   scope "/api", Pleroma.Web do
@@ -513,7 +512,7 @@ defmodule Pleroma.Web.Router do
   end
 
   pipeline :ostatus do
-    plug(:accepts, ["html", "xml", "atom", "activity+json", "json"])
+    plug(:accepts, ["html", "xml", "rss", "atom", "activity+json", "json"])
     plug(Pleroma.Plugs.StaticFEPlug)
   end
 
@@ -541,6 +540,7 @@ defmodule Pleroma.Web.Router do
     get("/mailer/unsubscribe/:token", Mailer.SubscriptionController, :unsubscribe)
   end
 
+  # Server to Server (S2S) AP interactions
   pipeline :activitypub do
     plug(:accepts, ["activity+json", "json"])
     plug(Pleroma.Web.Plugs.HTTPSignaturePlug)
@@ -554,6 +554,7 @@ defmodule Pleroma.Web.Router do
     get("/users/:nickname/outbox", ActivityPubController, :outbox)
   end
 
+  # Client to Server (C2S) AP interactions
   pipeline :activitypub_client do
     plug(:accepts, ["activity+json", "json"])
     plug(:fetch_session)
@@ -597,8 +598,8 @@ defmodule Pleroma.Web.Router do
       post("/inbox", ActivityPubController, :inbox)
     end
 
-    get("/following", ActivityPubController, :following, assigns: %{relay: true})
-    get("/followers", ActivityPubController, :followers, assigns: %{relay: true})
+    get("/following", ActivityPubController, :relay_following)
+    get("/followers", ActivityPubController, :relay_followers)
   end
 
   scope "/internal/fetch", Pleroma.Web.ActivityPub do