diff options
author | href <href@random.sh> | 2018-01-31 20:36:42 +0100 |
---|---|---|
committer | href <href@random.sh> | 2018-01-31 20:36:42 +0100 |
commit | fcb2a082346054108f3f16cffe968450cf961976 (patch) | |
tree | 8e7d2eb9eeebf854e62e08c29b147f34dfeb1881 /lib/lsg_web/controllers/page_controller.ex |
import
Diffstat (limited to '')
-rw-r--r-- | lib/lsg_web/controllers/page_controller.ex | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/lsg_web/controllers/page_controller.ex b/lib/lsg_web/controllers/page_controller.ex new file mode 100644 index 0000000..3d4e444 --- /dev/null +++ b/lib/lsg_web/controllers/page_controller.ex @@ -0,0 +1,20 @@ +defmodule LSGWeb.PageController do + use LSGWeb, :controller + + def index(conn, _params) do + render conn, "index.html" + end + + def icecast(conn, _params) do + conn + |> json(LSG.IcecastAgent.get) + end + + def widget(conn, options) do + icecast = LSG.IcecastAgent.get + conn + |> put_layout(false) + |> render("widget.html", icecast: icecast) + end + +end |