|
|
@ -35,23 +35,7 @@ defmodule DecentralisedBookIndexWeb.Router do
|
|
|
|
scope "/", DecentralisedBookIndexWeb do
|
|
|
|
scope "/", DecentralisedBookIndexWeb do
|
|
|
|
pipe_through :browser
|
|
|
|
pipe_through :browser
|
|
|
|
|
|
|
|
|
|
|
|
live "/", BookLive.Index, :index
|
|
|
|
ash_authentication_live_session :maybe_authenticated_routes, on_mount: {DecentralisedBookIndexWeb.LiveUserAuth, :live_user_optional} do
|
|
|
|
|
|
|
|
|
|
|
|
live "/publishers", PublisherLive.Index, :index
|
|
|
|
|
|
|
|
live "/publishers/new", PublisherLive.Index, :new
|
|
|
|
|
|
|
|
live "/publishers/:id/edit", PublisherLive.Index, :edit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
live "/publishers/:id", PublisherLive.Show, :show
|
|
|
|
|
|
|
|
live "/publishers/:id/show/edit", PublisherLive.Show, :edit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
live "/servers", DbiServerLive.Index, :index
|
|
|
|
|
|
|
|
live "/servers/new", DbiServerLive.Index, :new
|
|
|
|
|
|
|
|
live "/servers/:id/edit", DbiServerLive.Index, :edit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
live "/servers/:id", DbiServerLive.Show, :show
|
|
|
|
|
|
|
|
live "/servers/:id/show/edit", DbiServerLive.Show, :edit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ash_authentication_live_session :authenticated_routes do
|
|
|
|
|
|
|
|
# in each liveview, add one of the following at the top of the module:
|
|
|
|
# in each liveview, add one of the following at the top of the module:
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# If an authenticated user must be present:
|
|
|
|
# If an authenticated user must be present:
|
|
|
@ -63,19 +47,35 @@ defmodule DecentralisedBookIndexWeb.Router do
|
|
|
|
# If an authenticated user must *not* be present:
|
|
|
|
# If an authenticated user must *not* be present:
|
|
|
|
# on_mount {DecentralisedBookIndexWeb.LiveUserAuth, :live_no_user}
|
|
|
|
# on_mount {DecentralisedBookIndexWeb.LiveUserAuth, :live_no_user}
|
|
|
|
|
|
|
|
|
|
|
|
live "/books", BookLive.Index, :index
|
|
|
|
live "/", BookLive.Index, :index
|
|
|
|
live "/books/new", BookLive.Edit, :new
|
|
|
|
|
|
|
|
live "/books/:id/edit", BookLive.Edit, :edit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
live "/books", BookLive.Index, :index
|
|
|
|
live "/books/:id", BookLive.Show, :show
|
|
|
|
live "/books/:id", BookLive.Show, :show
|
|
|
|
live "/books/:id/show/edit", BookLive.Show, :edit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
live "/authors", AuthorLive.Index, :index
|
|
|
|
live "/authors", AuthorLive.Index, :index
|
|
|
|
|
|
|
|
live "/authors/:id", AuthorLive.Show, :show
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ash_authentication_live_session :authenticated_routes, on_mount: {DecentralisedBookIndexWeb.LiveUserAuth, :live_user_required} do
|
|
|
|
|
|
|
|
live "/books/new", BookLive.Edit, :new
|
|
|
|
|
|
|
|
live "/books/:id/edit", BookLive.Edit, :edit
|
|
|
|
|
|
|
|
|
|
|
|
live "/authors/new", AuthorLive.Edit, :new
|
|
|
|
live "/authors/new", AuthorLive.Edit, :new
|
|
|
|
live "/authors/:id/edit", AuthorLive.Edit, :edit
|
|
|
|
live "/authors/:id/edit", AuthorLive.Edit, :edit
|
|
|
|
|
|
|
|
|
|
|
|
live "/authors/:id", AuthorLive.Show, :show
|
|
|
|
live "/publishers", PublisherLive.Index, :index
|
|
|
|
live "/authors/:id/show/edit", AuthorLive.Show, :edit
|
|
|
|
live "/publishers/new", PublisherLive.Index, :new
|
|
|
|
|
|
|
|
live "/publishers/:id/edit", PublisherLive.Index, :edit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
live "/publishers/:id", PublisherLive.Show, :show
|
|
|
|
|
|
|
|
live "/publishers/:id/show/edit", PublisherLive.Show, :edit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
live "/servers", DbiServerLive.Index, :index
|
|
|
|
|
|
|
|
live "/servers/new", DbiServerLive.Index, :new
|
|
|
|
|
|
|
|
live "/servers/:id/edit", DbiServerLive.Index, :edit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
live "/servers/:id", DbiServerLive.Show, :show
|
|
|
|
|
|
|
|
live "/servers/:id/show/edit", DbiServerLive.Show, :edit
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|