Merge branch 'live-dashboard' into 'develop'
authorAlex Gleason <alex@alexgleason.me>
Sun, 19 Dec 2021 17:35:14 +0000 (17:35 +0000)
committerAlex Gleason <alex@alexgleason.me>
Sun, 19 Dec 2021 17:35:14 +0000 (17:35 +0000)
Add Phoenix LiveDashboard

See merge request pleroma/pleroma!3566

1  2 
lib/pleroma/web/router.ex

index 197e1f3462d13b75b4f0b87cfe95fe15dcf5a2b4,ba2ca50e3dbb9cdf280ba51092d43722164a86ae..3f708a9855c338611395441837be3034cba14b1c
@@@ -4,6 -4,7 +4,7 @@@
  
  defmodule Pleroma.Web.Router do
    use Pleroma.Web, :router
+   import Phoenix.LiveDashboard.Router
  
    pipeline :accepts_html do
      plug(:accepts, ["html"])
      patch("/users/deactivate", UserController, :deactivate)
      patch("/users/approve", UserController, :approve)
  
 +    patch("/users/suggest", UserController, :suggest)
 +    patch("/users/unsuggest", UserController, :unsuggest)
 +
      get("/relay", RelayController, :index)
      post("/relay", RelayController, :follow)
      delete("/relay", RelayController, :unfollow)
      delete("/push/subscription", SubscriptionController, :delete)
  
      get("/suggestions", SuggestionController, :index)
 +    delete("/suggestions/:account_id", SuggestionController, :dismiss)
  
      get("/timelines/home", TimelineController, :home)
      get("/timelines/direct", TimelineController, :direct)
      get("/search", SearchController, :search2)
  
      post("/media", MediaController, :create2)
 +
 +    get("/suggestions", SuggestionController, :index2)
    end
  
    scope "/api", Pleroma.Web 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 [