defmodule TechRadarEditor.Router do use TechRadarEditor.Web, :router pipeline :browser do plug :accepts, ["html"] plug :fetch_session plug :fetch_flash plug :protect_from_forgery plug :put_secure_browser_headers end pipeline :api do plug :accepts, ["json"] end scope "/", TechRadarEditor do pipe_through :browser # Use the default browser stack resources "/", RadarController, only: [:index, :create, :delete] end scope "/admin", TechRadarEditor do pipe_through :browser resources "/radar_data_point", RadarDataPointController end # Other scopes may use custom stacks. # scope "/api", TechRadarEditor do # pipe_through :api # end end