mirror of
https://github.com/mgerb/classic-wow-forums
synced 2026-01-11 09:32:51 +00:00
init
This commit is contained in:
28
lib/myapp_web/router.ex
Normal file
28
lib/myapp_web/router.ex
Normal 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
|
||||
Reference in New Issue
Block a user