Created
June 17, 2015 09:20
-
-
Save adanselm/8bfb4c78ed9d6c350329 to your computer and use it in GitHub Desktop.
A typical Phoenix router
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule SbSso.Router do | |
use Phoenix.Router | |
pipeline :api do | |
plug :accepts, ~w(json) | |
end | |
# /API section | |
scope "/api", alias: SbSso.Api, as: :api do | |
pipe_through :api | |
resources "/users", UserController, except: [:new, :edit] do | |
resources "/subs", SubscriptionController, only: [:index, :show, :create] | |
end | |
resources "/products", ProductController, except: [:new, :edit] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment