Add a stats agent for storing data from expensive queries.
[akkoma] / lib / pleroma / web / router.ex
index 8d856649020e11fae49a3604c513f83355961e42..09104fc86c366c1caa61d05645ec95a054ccc928 100644 (file)
@@ -51,6 +51,11 @@ defmodule Pleroma.Web.Router do
     get "/emoji", UtilController, :emoji
   end
 
+  scope "/api/pleroma", Pleroma.Web.TwitterAPI do
+    pipe_through :authenticated_api
+    post "/follow_import", UtilController, :follow_import
+  end
+
   scope "/oauth", Pleroma.Web.OAuth do
     get "/authorize", OAuthController, :authorize
     post "/authorize", OAuthController, :create_authorization
@@ -101,6 +106,7 @@ defmodule Pleroma.Web.Router do
   scope "/api/v1", Pleroma.Web.MastodonAPI do
     pipe_through :api
     get "/instance", MastodonAPIController, :masto_instance
+    get "/instance/peers", MastodonAPIController, :peers
     post "/apps", MastodonAPIController, :create_app
     get "/custom_emojis", MastodonAPIController, :custom_emojis
 
@@ -233,6 +239,14 @@ defmodule Pleroma.Web.Router do
     delete "/auth/sign_out", MastodonAPIController, :logout
   end
 
+  pipeline :remote_media do
+    plug :accepts, ["html"]
+  end
+  scope "/proxy/", Pleroma.Web.MediaProxy do
+    pipe_through :remote_media
+    get "/:sig/:url", MediaProxyController, :remote
+  end
+
   scope "/", Fallback do
     get "/*path", RedirectController, :redirector
   end