legendary-doc-site/apps/admin/lib/admin/router.ex

21 lines
409 B
Elixir

defmodule Legendary.Admin.Router do
use Legendary.Admin, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :require_admin do
plug Legendary.AuthWeb.Plugs.RequireAdmin
end
pipeline :api do
plug :accepts, ["json"]
end
use Legendary.Admin.Routes
end