aboutsummaryrefslogtreecommitdiff
path: root/lib/waev_web/router.ex
blob: 29d1b20f5723d403f9d4be5cd4ba94a07f0d5ea8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
defmodule WaevWeb.Router do
  use WaevWeb, :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 "/", WaevWeb do
    pipe_through :browser

    get "/", PageController, :index
    # index,edit,new,show,create,update
    resources "/exports", ExportsController, only: [:show]
    get "/exports/:id/media/:at_id", ExportsController, :get_media
    get "/exports/:id/avatars/:av_id", ExportsController, :get_avatar
  end

  # Other scopes may use custom stacks.
  # scope "/api", WaevWeb do
  #   pipe_through :api
  # end
end