Merge remote-tracking branch 'origin/develop' into live-dashboard
[akkoma] / lib / pleroma / web / router.ex
index dae1136176c794a3fa7f5489b8716a8c41263825..ba2ca50e3dbb9cdf280ba51092d43722164a86ae 100644 (file)
@@ -4,6 +4,7 @@
 
 defmodule Pleroma.Web.Router do
   use Pleroma.Web, :router
+  import Phoenix.LiveDashboard.Router
 
   pipeline :accepts_html do
     plug(:accepts, ["html"])
@@ -757,6 +758,11 @@ defmodule Pleroma.Web.Router do
     end
   end
 
+  scope "/" do
+    pipe_through([:pleroma_html, :authenticate, :require_admin])
+    live_dashboard("/phoenix/live_dashboard")
+  end
+
   # Test-only routes needed to test action dispatching and plug chain execution
   if Pleroma.Config.get(:env) == :test do
     @test_actions [