aboutsummaryrefslogtreecommitdiff
path: root/web/router.ex
diff options
context:
space:
mode:
Diffstat (limited to 'web/router.ex')
-rw-r--r--web/router.ex27
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