projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a stats agent for storing data from expensive queries.
[akkoma]
/
lib
/
pleroma
/
web
/
router.ex
diff --git
a/lib/pleroma/web/router.ex
b/lib/pleroma/web/router.ex
index 6806e8a75431a4ee9532772e46d1b014867f9e55..09104fc86c366c1caa61d05645ec95a054ccc928 100644
(file)
--- a/
lib/pleroma/web/router.ex
+++ b/
lib/pleroma/web/router.ex
@@
-51,6
+51,11
@@
defmodule Pleroma.Web.Router do
get "/emoji", UtilController, :emoji
end
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
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
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
post "/apps", MastodonAPIController, :create_app
get "/custom_emojis", MastodonAPIController, :custom_emojis
@@
-142,6
+148,8
@@
defmodule Pleroma.Web.Router do
get "/qvitter/statuses/user_timeline", TwitterAPI.Controller, :user_timeline
get "/users/show", TwitterAPI.Controller, :show_user
get "/qvitter/statuses/user_timeline", TwitterAPI.Controller, :user_timeline
get "/users/show", TwitterAPI.Controller, :show_user
+ get "/statuses/followers", TwitterAPI.Controller, :followers
+ get "/statuses/friends", TwitterAPI.Controller, :friends
get "/statuses/show/:id", TwitterAPI.Controller, :fetch_status
get "/statusnet/conversation/:id", TwitterAPI.Controller, :fetch_conversation
get "/statuses/show/:id", TwitterAPI.Controller, :fetch_status
get "/statusnet/conversation/:id", TwitterAPI.Controller, :fetch_conversation
@@
-188,8
+196,6
@@
defmodule Pleroma.Web.Router do
post "/qvitter/update_avatar", TwitterAPI.Controller, :update_avatar
post "/qvitter/update_avatar", TwitterAPI.Controller, :update_avatar
- get "/statuses/followers", TwitterAPI.Controller, :followers
- get "/statuses/friends", TwitterAPI.Controller, :friends
get "/friends/ids", TwitterAPI.Controller, :friends_ids
get "/friendships/no_retweets/ids", TwitterAPI.Controller, :empty_array
get "/friends/ids", TwitterAPI.Controller, :friends_ids
get "/friendships/no_retweets/ids", TwitterAPI.Controller, :empty_array
@@
-233,6
+239,14
@@
defmodule Pleroma.Web.Router do
delete "/auth/sign_out", MastodonAPIController, :logout
end
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
scope "/", Fallback do
get "/*path", RedirectController, :redirector
end