init v0
This commit is contained in:
parent
561ea7543d
commit
43e6b6d318
25 changed files with 8063 additions and 374 deletions
|
|
@ -17,16 +17,19 @@ defmodule ZoeyscomputerWeb.Router do
|
|||
plug :accepts, ["json"]
|
||||
end
|
||||
|
||||
scope "/", ZoeyscomputerWeb do
|
||||
pipe_through :browser
|
||||
|
||||
get "/", PageController, :home
|
||||
end
|
||||
# scope "/", ZoeyscomputerWeb do
|
||||
# pipe_through :browser
|
||||
#
|
||||
# live_session :current_user,
|
||||
# on_mount: [{ZoeyscomputerWeb.UserAuth, :mount_current_user}] do
|
||||
# live "/", HomeLive, :index
|
||||
# end
|
||||
# end
|
||||
|
||||
# Other scopes may use custom stacks.
|
||||
# scope "/api", ZoeyscomputerWeb do
|
||||
# pipe_through :api
|
||||
# end
|
||||
scope "/api", ZoeyscomputerWeb do
|
||||
pipe_through :api
|
||||
end
|
||||
|
||||
# Enable LiveDashboard and Swoosh mailbox preview in development
|
||||
if Application.compile_env(:zoeyscomputer, :dev_routes) do
|
||||
|
|
@ -38,9 +41,12 @@ defmodule ZoeyscomputerWeb.Router do
|
|||
import Phoenix.LiveDashboard.Router
|
||||
|
||||
scope "/dev" do
|
||||
pipe_through :browser
|
||||
pipe_through [:browser, :require_authenticated_admin_user]
|
||||
|
||||
live_dashboard "/dashboard",
|
||||
metrics: ZoeyscomputerWeb.Telemetry,
|
||||
ecto_repos: Zoeyscomputer.Repo
|
||||
|
||||
live_dashboard "/dashboard", metrics: ZoeyscomputerWeb.Telemetry
|
||||
forward "/mailbox", Plug.Swoosh.MailboxPreview
|
||||
end
|
||||
end
|
||||
|
|
@ -82,6 +88,7 @@ defmodule ZoeyscomputerWeb.Router do
|
|||
on_mount: [{ZoeyscomputerWeb.UserAuth, :mount_current_user}] do
|
||||
live "/users/confirm/:token", UserConfirmationLive, :edit
|
||||
live "/users/confirm", UserConfirmationInstructionsLive, :new
|
||||
live "/", HomeLive, :index
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue