diff options
author | Alex Gleason <alex@alexgleason.me> | 2021-12-15 16:17:11 -0500 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2021-12-15 19:05:27 -0500 |
commit | 29d80b39f287ed2488a612280d41e9dd2e40a7cc (patch) | |
tree | c70193f65824521ecf3940c8e88907c2a6d7f6ba /lib/pleroma | |
parent | 0b2119d4a791b3623b304b0bab683609d23271d4 (diff) | |
download | pleroma-29d80b39f287ed2488a612280d41e9dd2e40a7cc.tar.gz |
Add Phoenix LiveDashboard
Co-authored-by: Egor Kislitsyn <egor@kislitsyn.com>
Diffstat (limited to 'lib/pleroma')
-rw-r--r-- | lib/pleroma/web/endpoint.ex | 1 | ||||
-rw-r--r-- | lib/pleroma/web/router.ex | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/pleroma/web/endpoint.ex b/lib/pleroma/web/endpoint.ex index 8e274de88..75484fac5 100644 --- a/lib/pleroma/web/endpoint.ex +++ b/lib/pleroma/web/endpoint.ex @@ -10,6 +10,7 @@ defmodule Pleroma.Web.Endpoint do alias Pleroma.Config socket("/socket", Pleroma.Web.UserSocket) + socket("/live", Phoenix.LiveView.Socket) plug(Plug.Telemetry, event_prefix: [:phoenix, :endpoint]) diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex index efca7078a..f1d5caddf 100644 --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@ -4,6 +4,7 @@ defmodule Pleroma.Web.Router do use Pleroma.Web, :router + import Phoenix.LiveDashboard.Router pipeline :accepts_html do plug(:accepts, ["html"]) @@ -778,6 +779,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 [ |