something awful login data

all the stuff to add 2 fields to the user object and to access the
logged0in user in a liveview session
This commit is contained in:
2022-07-18 15:16:57 +02:00
parent 3e8f4ef042
commit 7035fe5b2d
12 changed files with 129 additions and 62 deletions

View File

@ -21,13 +21,22 @@ defmodule SomethingErlangWeb.Router do
pipe_through :browser
get "/", PageController, :index
end
live "/threads", ThreadLive.Index, :index
live "/threads/new", ThreadLive.Index, :new
live "/threads/:id/edit", ThreadLive.Index, :edit
scope "/thread", SomethingErlangWeb do
pipe_through :browser
live "/threads/:id", ThreadLive.Show, :show
live "/threads/:id/show/edit", ThreadLive.Show, :edit
live "/:id", ThreadLive.Show, :show
end
scope "/admin", SomethingErlangWeb do
pipe_through [:browser, :require_authenticated_user]
live "/thread", ThreadLive.Index, :index
live "/thread/new", ThreadLive.Index, :new
live "/thread/:id/edit", ThreadLive.Index, :edit
live "/thread/:id/show/edit", ThreadLive.Show, :edit
end
# Other scopes may use custom stacks.