esrom/ui/lib/ui_web/controllers/page_controller.ex

18 lines
341 B
Elixir
Raw Normal View History

2019-07-13 18:16:46 +00:00
defmodule UiWeb.PageController do
use UiWeb, :controller
alias Phoenix.LiveView
2019-07-13 18:16:46 +00:00
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
2019-07-13 18:16:46 +00:00
end