Update routes to :ensure_authenticated
Implies setting :current_user for liveviews.
This commit is contained in:
@ -68,36 +68,36 @@ defmodule OutlookWeb.Router do
|
||||
on_mount: [{OutlookWeb.UserAuth, :ensure_authenticated}] do
|
||||
live "/users/settings", UserSettingsLive, :edit
|
||||
live "/users/settings/confirm_email/:token", UserSettingsLive, :confirm_email
|
||||
|
||||
live "/authors", AuthorLive.Index, :index
|
||||
live "/authors/new", AuthorLive.Index, :new
|
||||
live "/authors/:id/edit", AuthorLive.Index, :edit
|
||||
|
||||
live "/authors/:id", AuthorLive.Show, :show
|
||||
live "/authors/:id/show/edit", AuthorLive.Show, :edit
|
||||
|
||||
live "/articles", ArticleLive.Index, :index
|
||||
live "/articles/:id/edit", ArticleLive.Index, :edit
|
||||
|
||||
live "/articles/new", ArticleLive.New, :new
|
||||
|
||||
live "/articles/:id", ArticleLive.Show, :show
|
||||
live "/articles/:id/show/edit", ArticleLive.Show, :edit
|
||||
|
||||
live "/translations", TranslationLive.Index, :index
|
||||
|
||||
live "/translations/new", TranslationLive.NewEdit, :new
|
||||
live "/translations/:id/edit", TranslationLive.NewEdit, :edit
|
||||
|
||||
live "/translations/:id", TranslationLive.Show, :show
|
||||
|
||||
live "/deepl_accounts", DeeplAccountLive.Index, :index
|
||||
live "/deepl_accounts/new", DeeplAccountLive.Index, :new
|
||||
live "/deepl_accounts/:id/edit", DeeplAccountLive.Index, :edit
|
||||
|
||||
live "/deepl_accounts/:id", DeeplAccountLive.Show, :show
|
||||
live "/deepl_accounts/:id/show/edit", DeeplAccountLive.Show, :edit
|
||||
end
|
||||
|
||||
live "/authors", AuthorLive.Index, :index
|
||||
live "/authors/new", AuthorLive.Index, :new
|
||||
live "/authors/:id/edit", AuthorLive.Index, :edit
|
||||
|
||||
live "/authors/:id", AuthorLive.Show, :show
|
||||
live "/authors/:id/show/edit", AuthorLive.Show, :edit
|
||||
|
||||
live "/articles", ArticleLive.Index, :index
|
||||
live "/articles/:id/edit", ArticleLive.Index, :edit
|
||||
|
||||
live "/articles/new", ArticleLive.New, :new
|
||||
|
||||
live "/articles/:id", ArticleLive.Show, :show
|
||||
live "/articles/:id/show/edit", ArticleLive.Show, :edit
|
||||
|
||||
live "/translations", TranslationLive.Index, :index
|
||||
|
||||
live "/translations/new", TranslationLive.NewEdit, :new
|
||||
live "/translations/:id/edit", TranslationLive.NewEdit, :edit
|
||||
|
||||
live "/translations/:id", TranslationLive.Show, :show
|
||||
|
||||
live "/deepl_accounts", DeeplAccountLive.Index, :index
|
||||
live "/deepl_accounts/new", DeeplAccountLive.Index, :new
|
||||
live "/deepl_accounts/:id/edit", DeeplAccountLive.Index, :edit
|
||||
|
||||
live "/deepl_accounts/:id", DeeplAccountLive.Show, :show
|
||||
live "/deepl_accounts/:id/show/edit", DeeplAccountLive.Show, :edit
|
||||
end
|
||||
|
||||
scope "/", OutlookWeb do
|
||||
|
||||
Reference in New Issue
Block a user