diff options
| author | Melonai <einebeere@gmail.com> | 2021-05-07 17:11:50 +0200 |
|---|---|---|
| committer | Melonai <einebeere@gmail.com> | 2021-05-07 17:11:50 +0200 |
| commit | 88c0fbf10145ddd4ccd10ee432b4ca1aadd96a91 (patch) | |
| tree | 33691a532f460dbdf8a0e7909b898c0b324eaa2f /lib/rook_web/router.ex | |
| download | rook-88c0fbf10145ddd4ccd10ee432b4ca1aadd96a91.tar.zst rook-88c0fbf10145ddd4ccd10ee432b4ca1aadd96a91.zip | |
Initial structure
Diffstat (limited to 'lib/rook_web/router.ex')
| -rw-r--r-- | lib/rook_web/router.ex | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/rook_web/router.ex b/lib/rook_web/router.ex new file mode 100644 index 0000000..298d722 --- /dev/null +++ b/lib/rook_web/router.ex @@ -0,0 +1,28 @@ +defmodule RookWeb.Router do + use RookWeb, :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 "/", RookWeb do + pipe_through :browser + + get "/", HomeController, :index + get "/share", AppController, :share + get "/:token", AppController, :request + end + + # Other scopes may use custom stacks. + # scope "/api", RookWeb do + # pipe_through :api + # end +end |
