dings with user assoc

This commit is contained in:
Rüdiger Diedrich
2024-02-26 14:37:03 +01:00
parent c242bbc633
commit 8c46519aaf
13 changed files with 638 additions and 0 deletions

View File

@ -23,6 +23,20 @@ defmodule DingeWeb.Router do
get "/", PageController, :home
end
scope "/", DingeWeb do
pipe_through [:browser, :require_authenticated_user]
live_session :dings_authenticated_user,
on_mount: [{DingeWeb.UserAuth, :ensure_authenticated}] do
live "/dings", DingLive.Index, :index
live "/dings/new", DingLive.Index, :new
live "/dings/:id/edit", DingLive.Index, :edit
live "/dings/:id", DingLive.Show, :show
live "/dings/:id/show/edit", DingLive.Show, :edit
end
end
# Other scopes may use custom stacks.
# scope "/api", DingeWeb do
# pipe_through :api