Changeset View
Changeset View
Standalone View
Standalone View
web/router.ex
Show All 10 Lines | pipeline :browser do | ||||
plug KolabChat.Plugs.SetUser | plug KolabChat.Plugs.SetUser | ||||
end | end | ||||
pipeline :api do | pipeline :api do | ||||
plug :accepts, ["json"] | plug :accepts, ["json"] | ||||
end | end | ||||
scope "/", KolabChat do | scope "/", KolabChat do | ||||
pipe_through :browser # Use the default browser stack | pipe_through :browser | ||||
get "/", PageController, :index | get "/", PageController, :index | ||||
end | end | ||||
scope "/chat", KolabChat do | |||||
pipe_through :browser | |||||
get "/", ChatController, :index | |||||
get "/:room", ChatController, :index | |||||
end | |||||
scope "/auth", KolabChat do | scope "/auth", KolabChat do | ||||
pipe_through :browser | pipe_through :browser | ||||
post "/default/callback", AuthController, :default_callback | post "/default/callback", AuthController, :default_callback | ||||
get "/logout", AuthController, :logout | get "/logout", AuthController, :logout | ||||
end | end | ||||
# Other scopes may use custom stacks. | # Other scopes may use custom stacks. | ||||
# scope "/api", KolabChat do | # scope "/api", KolabChat do | ||||
# pipe_through :api | # pipe_through :api | ||||
# end | # end | ||||
end | end |