Skip to content

Instantly share code, notes, and snippets.

@shankardevy
Last active Aug 18, 2017
Embed
What would you like to do?
Add registration paths to router
defmodule MangoWeb.Router do
use MangoWeb, :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 "/", MangoWeb do
pipe_through :browser # Use the default browser stack
get "/", PageController, :index
get "/categories/:name", CategoryController, :show
get "/register", RegistrationController, :new
post "/register", RegistrationController, :create
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment