blob: b356b9cc9de4e849fc45076e8ea8e914778c5c4f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
defmodule LSGWeb.PageController do
use LSGWeb, :controller
def index(conn, _params) do
render conn, "index.html"
end
def api(conn, _params) do
render conn, "api.html"
end
def irc(conn, _) do
bot_helps = for mod <- Application.get_env(:lsg, :irc)[:handlers] do
mod.irc_doc()
end
render conn, "irc.html", bot_helps: bot_helps
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
|