add authenticated routes first

This commit is contained in:
shibao 2022-10-26 22:09:25 -04:00
parent cc00de71dc
commit 6e6a4c726e
1 changed files with 13 additions and 13 deletions

View File

@ -54,19 +54,6 @@ defmodule MemexWeb.Router do
end
live_session :default do
scope "/", MemexWeb do
pipe_through [:browser]
live "/notes", NoteLive.Index, :index
live "/notes/:id", NoteLive.Show, :show
live "/contexts", ContextLive.Index, :index
live "/contexts/:id", ContextLive.Show, :show
live "/pipelines", PipelineLive.Index, :index
live "/pipelines/:id", PipelineLive.Show, :show
end
scope "/", MemexWeb do
pipe_through [:browser, :require_authenticated_user]
@ -87,6 +74,19 @@ defmodule MemexWeb.Router do
delete "/users/settings/:id", UserSettingsController, :delete
get "/users/settings/confirm_email/:token", UserSettingsController, :confirm_email
end
scope "/", MemexWeb do
pipe_through [:browser]
live "/notes", NoteLive.Index, :index
live "/notes/:id", NoteLive.Show, :show
live "/contexts", ContextLive.Index, :index
live "/contexts/:id", ContextLive.Show, :show
live "/pipelines", PipelineLive.Index, :index
live "/pipelines/:id", PipelineLive.Show, :show
end
end
live_session :admin do