summaryrefslogtreecommitdiff
path: root/lib/lsg_web/controllers/page_controller.ex
blob: 3d4e4443db188ae5745c493be64ef8914efa845f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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