diff options
Diffstat (limited to '')
-rw-r--r-- | web/router.ex | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/web/router.ex b/web/router.ex new file mode 100644 index 0000000..453b1f7 --- /dev/null +++ b/web/router.ex @@ -0,0 +1,27 @@ +defmodule TheTranscriberBackend.Router do + use TheTranscriberBackend.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 "/", TheTranscriberBackend do + pipe_through :browser # Use the default browser stack + + get "/", PageController, :index + resources "/audio_file", AudioFileController + end + + # Other scopes may use custom stacks. + # scope "/api", TheTranscriberBackend do + # pipe_through :api + # end +end |