dings with user assoc
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user