This commit is contained in:
zack 2024-10-21 19:20:35 -04:00
parent 561ea7543d
commit 43e6b6d318
No known key found for this signature in database
GPG key ID: 5F873416BCF59F35
25 changed files with 8063 additions and 374 deletions

View file

@ -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