diff options
Diffstat (limited to 'lib/pleroma/web/router.ex')
-rw-r--r-- | lib/pleroma/web/router.ex | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex index 57570b672..04dbaa290 100644 --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@ -463,7 +463,7 @@ defmodule Pleroma.Web.Router do scope "/api/web", Pleroma.Web do pipe_through(:authenticated_api) - put("/settings", MastoFEController, :put_settings) + put("/settings", FrontendController, :put_settings, as: :frontend_mastodon) end scope "/api/v1", Pleroma.Web.MastodonAPI do @@ -550,7 +550,6 @@ defmodule Pleroma.Web.Router do pipeline :ostatus do plug(:accepts, ["html", "xml", "rss", "atom", "activity+json", "json"]) - plug(Pleroma.Plugs.StaticFEPlug) end pipeline :oembed do @@ -655,7 +654,7 @@ defmodule Pleroma.Web.Router do scope "/", Pleroma.Web do pipe_through(:api) - get("/web/manifest.json", MastoFEController, :manifest) + get("/web/manifest.json", FrontendController, :manifest, as: :frontend_mastodon) end scope "/", Pleroma.Web do @@ -666,8 +665,7 @@ defmodule Pleroma.Web.Router do post("/auth/password", MastodonAPI.AuthController, :password_reset) - get("/web/*path", MastoFEController, :index) - + get("/web/*path", FrontendController, :index, as: :frontend_mastodon) get("/embed/:id", EmbedController, :show) end @@ -717,12 +715,16 @@ defmodule Pleroma.Web.Router do get("/check_password", MongooseIMController, :check_password) end - scope "/", Fallback do - get("/registration/:token", RedirectController, :registration_page) - get("/:maybe_nickname_or_id", RedirectController, :redirector_with_meta) - get("/api*path", RedirectController, :api_not_implemented) - get("/*path", RedirectController, :redirector) + scope "/pleroma/admin", Pleroma.Web do + get("/*path", FrontendController, :index, as: :frontend_admin) + end + + scope "/", Pleroma.Web do + get("/registration/:token", FrontendController, :registration_page) + get("/:maybe_nickname_or_id", FrontendController, :index_with_meta) + get("/api*path", FrontendController, :api_not_implemented) + get("/*path", FrontendController, :index) - options("/*path", RedirectController, :empty) + options("/*path", FrontendController, :empty) end end |