Move live_dashboard to /admin/dashboard, admin-only
This commit is contained in:
parent
ba0f1161a7
commit
d1ec45b6d3
1 changed files with 4 additions and 3 deletions
|
|
@ -76,12 +76,13 @@ defmodule MicrowavepropWeb.Router do
|
|||
# end
|
||||
|
||||
scope "/" do
|
||||
pipe_through :browser
|
||||
pipe_through [:browser, :require_authenticated_user]
|
||||
|
||||
live_dashboard "/dashboard",
|
||||
live_dashboard "/admin/dashboard",
|
||||
metrics: MicrowavepropWeb.Telemetry,
|
||||
ecto_repos: [Microwaveprop.Repo],
|
||||
ecto_psql_extras_options: [long_running_queries: [threshold: "200 milliseconds"]]
|
||||
ecto_psql_extras_options: [long_running_queries: [threshold: "200 milliseconds"]],
|
||||
on_mount: [{MicrowavepropWeb.UserAuth, :require_admin}]
|
||||
end
|
||||
|
||||
# Enable Swoosh mailbox preview in development
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue