feat: port basic functionality to elixir

This commit is contained in:
Schuwi
2025-09-14 12:19:44 +02:00
parent 0a6b7e08e2
commit 5e49cb79a0
14 changed files with 1405 additions and 14 deletions

View File

@@ -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.