summaryrefslogtreecommitdiff
path: root/lib/lsg_web/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lsg_web/controllers')
-rw-r--r--lib/lsg_web/controllers/page_controller.ex20
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