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:
@ -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.
|
||||
|
Reference in New Issue
Block a user