feat: add /guess to authenticated endpoints

This commit is contained in:
Moritz Böhme 2024-08-18 15:22:38 +02:00
parent 2eae7d6533
commit a782d386ee
Signed by: moritz
GPG key ID: 970C6E89EB0547A9

View file

@ -21,7 +21,6 @@ defmodule PentoWeb.Router do
pipe_through :browser
get "/", PageController, :home
live "/guess", WrongLive
end
# Other scopes may use custom stacks.
@ -66,9 +65,12 @@ defmodule PentoWeb.Router do
pipe_through [:browser, :require_authenticated_user]
live_session :require_authenticated_user,
root_layout: { PentoWeb.Layouts, :root },
on_mount: [{PentoWeb.UserAuth, :ensure_authenticated}] do
live "/users/settings", UserSettingsLive, :edit
live "/users/settings/confirm_email/:token", UserSettingsLive, :confirm_email
live "/guess", WrongLive
end
end