1
0
mirror of https://github.com/mgerb/classic-wow-forums synced 2026-01-11 09:32:51 +00:00
This commit is contained in:
2017-12-31 20:19:44 -06:00
commit e856cc5172
37 changed files with 1196 additions and 0 deletions

28
lib/myapp_web/router.ex Normal file
View File

@@ -0,0 +1,28 @@
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