From: Alex Gleason Date: Sun, 19 Dec 2021 17:35:14 +0000 (+0000) Subject: Merge branch 'live-dashboard' into 'develop' X-Git-Url: http://git.squeep.com/?a=commitdiff_plain;h=1ff9ffed83b098ebc0921e70c1636c6c1fb0b18c;hp=-c;p=akkoma Merge branch 'live-dashboard' into 'develop' Add Phoenix LiveDashboard See merge request pleroma/pleroma!3566 --- 1ff9ffed83b098ebc0921e70c1636c6c1fb0b18c diff --combined lib/pleroma/web/router.ex index 197e1f346,ba2ca50e3..3f708a985 --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@@ -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"]) @@@ -192,9 -193,6 +193,9 @@@ 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) @@@ -538,7 -536,6 +539,7 @@@ 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) @@@ -590,8 -587,6 +591,8 @@@ get("/search", SearchController, :search2) post("/media", MediaController, :create2) + + get("/suggestions", SuggestionController, :index2) end scope "/api", Pleroma.Web do @@@ -763,6 -758,11 +764,11 @@@ 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 [