-
-
Save shankardevy/b0b0e61368873c072bac0b8c8f6d7de6 to your computer and use it in GitHub Desktop.
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 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 | |
plug MangoWeb.Plugs.LoadCustomer | |
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 | |
get "/login", SessionController, :new | |
post "/login", SessionController, :create | |
get "/logout", SessionController, :delete | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment