feat: add /guess to authenticated endpoints

main
Moritz Böhme 2024-08-18 15:22:38 +02:00
parent 2eae7d6533
commit a782d386ee
Signed by: moritz
GPG Key ID: 970C6E89EB0547A9
1 changed files with 3 additions and 1 deletions

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