plug(Pleroma.Web.Plugs.UserIsAdminPlug)
end
+ pipeline :mastodon_html do
+ plug(:browser)
+ plug(:authenticate)
+ plug(:after_auth)
+ end
+
pipeline :pleroma_html do
plug(:browser)
plug(:authenticate)
post("/delete_account", UtilController, :delete_account)
put("/notification_settings", UtilController, :update_notificaton_settings)
post("/disable_account", UtilController, :disable_account)
+ post("/move_account", UtilController, :move_account)
+
+ put("/aliases", UtilController, :add_alias)
+ get("/aliases", UtilController, :list_aliases)
+ delete("/aliases", UtilController, :delete_alias)
end
scope "/api/pleroma", Pleroma.Web.PleromaAPI do
get("/timelines/list/:list_id", TimelineController, :list)
end
+ scope "/api/web", Pleroma.Web do
+ pipe_through(:authenticated_api)
+
+ # Backend-obscure settings blob for MastoFE, don't parse/reuse elsewhere
+ put("/settings", MastoFEController, :put_settings)
+ end
+
scope "/api/v1", Pleroma.Web.MastodonAPI do
pipe_through(:app_api)
get("/accounts/search", SearchController, :account_search)
get("/search", SearchController, :search)
+ get("/accounts/lookup", AccountController, :lookup)
+
get("/accounts/:id/statuses", AccountController, :statuses)
get("/accounts/:id/followers", AccountController, :followers)
get("/accounts/:id/following", AccountController, :following)
pipe_through(:api)
get("/manifest.json", ManifestController, :show)
+ get("/web/manifest.json", MastoFEController, :manifest)
end
scope "/", Pleroma.Web do
- pipe_through(:pleroma_html)
+ pipe_through(:mastodon_html)
+
+ get("/web/login", MastodonAPI.AuthController, :login)
+ delete("/auth/sign_out", MastodonAPI.AuthController, :logout)
+
+ post("/auth/password", MastodonAPI.AuthController, :password_reset)
+
+ get("/web/*path", MastoFEController, :index)
- post("/auth/password", TwitterAPI.PasswordController, :request)
+ get("/embed/:id", EmbedController, :show)
end
scope "/proxy/", Pleroma.Web do