This repository has been archived on 2024-06-24. You can view files and clone it, but cannot push or open issues or pull requests.
augie/webapp/lib/augie_web/router.ex

32 lines
749 B
Elixir
Raw Normal View History

2019-11-29 17:55:52 +13:00
defmodule AugieWeb.Router do
use AugieWeb, :router
2020-04-28 21:09:54 +12:00
import Phoenix.LiveDashboard.Router
2019-11-29 17:55:52 +13:00
pipeline :browser do
2019-12-01 17:11:36 +13:00
plug(:accepts, ["html"])
plug(:fetch_session)
plug(:fetch_live_flash)
2019-12-01 17:11:36 +13:00
plug(:protect_from_forgery)
plug(:put_secure_browser_headers)
2020-04-28 21:09:54 +12:00
plug(:put_root_layout, {AugieWeb.LayoutView, :root})
2019-11-29 17:55:52 +13:00
end
pipeline :api do
2019-12-01 17:11:36 +13:00
plug(:accepts, ["json"])
2019-11-29 17:55:52 +13:00
end
2020-04-28 21:09:54 +12:00
scope "/", AugieWeb do
2019-12-01 17:11:36 +13:00
pipe_through(:browser)
2019-11-29 17:55:52 +13:00
2020-04-28 21:09:54 +12:00
live("/", DashboardLive)
live_dashboard("/dashboard", metrics: AugieWeb.Telemetry)
get("/camera/static", CameraController, :static)
get("/camera/stream", CameraController, :stream)
end
2020-04-28 21:09:54 +12:00
# Other scopes may use custom stacks.
# scope "/api", AugieWeb do
# pipe_through :api
# end
2019-11-29 17:55:52 +13:00
end