|
|
@ -56,7 +56,7 @@ defmodule DecentralisedBookIndexWeb.Router do
|
|
|
|
live "/authors/:id", AuthorLive.Show, :show
|
|
|
|
live "/authors/:id", AuthorLive.Show, :show
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
ash_authentication_live_session :authenticated_routes, on_mount: {DecentralisedBookIndexWeb.LiveUserAuth, :live_user_required} do
|
|
|
|
ash_authentication_live_session :moderator_authenticated_routes, on_mount: {DecentralisedBookIndexWeb.LiveUserAuth, :moderator_required} do
|
|
|
|
live "/books/new", BookLive.Edit, :new
|
|
|
|
live "/books/new", BookLive.Edit, :new
|
|
|
|
live "/books/:id/edit", BookLive.Edit, :edit
|
|
|
|
live "/books/:id/edit", BookLive.Edit, :edit
|
|
|
|
|
|
|
|
|
|
|
@ -69,7 +69,9 @@ defmodule DecentralisedBookIndexWeb.Router do
|
|
|
|
|
|
|
|
|
|
|
|
live "/publishers/:id", PublisherLive.Show, :show
|
|
|
|
live "/publishers/:id", PublisherLive.Show, :show
|
|
|
|
live "/publishers/:id/show/edit", PublisherLive.Show, :edit
|
|
|
|
live "/publishers/:id/show/edit", PublisherLive.Show, :edit
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ash_authentication_live_session :admin_authenticated_routes, on_mount: {DecentralisedBookIndexWeb.LiveUserAuth, :admin_required} do
|
|
|
|
live "/servers", DbiServerLive.Index, :index
|
|
|
|
live "/servers", DbiServerLive.Index, :index
|
|
|
|
live "/servers/new", DbiServerLive.Index, :new
|
|
|
|
live "/servers/new", DbiServerLive.Index, :new
|
|
|
|
live "/servers/:id/edit", DbiServerLive.Index, :edit
|
|
|
|
live "/servers/:id/edit", DbiServerLive.Index, :edit
|
|
|
|