feat: port basic functionality to elixir
This commit is contained in:
@@ -10,6 +10,10 @@ defmodule ComponentsElixirWeb.Router do
|
||||
plug :put_secure_browser_headers
|
||||
end
|
||||
|
||||
pipeline :authenticated do
|
||||
plug ComponentsElixirWeb.AuthPlug
|
||||
end
|
||||
|
||||
pipeline :api do
|
||||
plug :accepts, ["json"]
|
||||
end
|
||||
@@ -17,7 +21,15 @@ defmodule ComponentsElixirWeb.Router do
|
||||
scope "/", ComponentsElixirWeb do
|
||||
pipe_through :browser
|
||||
|
||||
get "/", PageController, :home
|
||||
live "/login", LoginLive, :index
|
||||
get "/login/authenticate", AuthController, :authenticate
|
||||
post "/logout", AuthController, :logout
|
||||
end
|
||||
|
||||
scope "/", ComponentsElixirWeb do
|
||||
pipe_through [:browser, :authenticated]
|
||||
|
||||
live "/", ComponentsLive, :index
|
||||
end
|
||||
|
||||
# Other scopes may use custom stacks.
|
||||
|
||||
Reference in New Issue
Block a user