move note and channel resources to /admin

This commit is contained in:
Inhji 2023-03-06 19:57:43 +01:00
parent 4ca873d77b
commit 62b118afe7
1 changed files with 9 additions and 3 deletions

View File

@ -21,9 +21,6 @@ defmodule ChiyaWeb.Router do
pipe_through :browser
get "/", PageController, :home
resources "/channels", ChannelController
resources "/notes", NoteController
end
# Other scopes may use custom stacks.
@ -48,6 +45,15 @@ defmodule ChiyaWeb.Router do
end
end
## Administrator routes
scope "/admin", ChiyaWeb do
pipe_through [:browser, :require_authenticated_user]
resources "/channels", ChannelController
resources "/notes", NoteController
end
## Authentication routes
scope "/", ChiyaWeb do