1
0
mirror of https://github.com/mgerb/classic-wow-forums synced 2026-01-12 10:02:49 +00:00
Files
classic-wow-forums/lib/myapp_web/router.ex
2017-12-31 20:19:44 -06:00

29 lines
528 B
Elixir

defmodule MyAppWeb.Router do
use MyAppWeb, :router
alias MyApp.Guardian.AuthPipeline
pipeline :api do
plug :accepts, ["json"]
end
pipeline :api_auth do
plug AuthPipeline.JSON
end
# Other scopes may use custom stacks.
scope "/api", MyAppWeb do
pipe_through [:api]
scope "/battlenet" do
get "/authorize", BattleNetController, :authorize
end
scope "/user" do
# authenticated routes
pipe_through [:api_auth]
get "/", UserController, :index
end
end
end