esrom/ui/lib/ui_web/controllers/page_controller.ex
Pim Kunis ad24ec96ac Migrate from channel to phoenix live view.
Move phoenix config to ui project.
Sync progress on page load.
2019-10-23 14:38:11 +02:00

17 lines
341 B
Elixir

defmodule UiWeb.PageController do
use UiWeb, :controller
alias Phoenix.LiveView
def index(conn, _params) do
send_resp(conn, 204, "")
end
def instructions(conn, _params) do
render(conn, :instructions)
end
def morse(conn, _params) do
LiveView.Controller.live_render(conn, UiWeb.MorseLive, session: %{})
end
end