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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
defmodule LSGWeb.Router do
use LSGWeb, :router
pipeline :browser do
plug :accepts, ["html", "txt"]
plug :fetch_session
plug :fetch_flash
#plug :protect_from_forgery
#plug :put_secure_browser_headers
end
pipeline :api do
plug :accepts, ["json", "sse"]
end
scope "/api", LSGWeb do
pipe_through :api
get "/irc-auth.sse", IrcAuthSseController, :sse
post "/sms/callback/Ovh", SmsController, :ovh_callback, as: :sms
end
scope "/", LSGWeb do
pipe_through :browser
get "/", PageController, :index
get "/embed/widget", PageController, :widget
get "/api", PageController, :api
get "/login/irc/:token", PageController, :token, as: :login
get "/api/untappd/callback", UntappdController, :callback, as: :untappd_callback
get "/-", IrcController, :index
get "/-/txt", IrcController, :txt
get "/-/txt/:name", IrcController, :txt
get "/-/alcoolog", AlcoologController, :index
get "/-/alcoolog/~/:account_name", AlcoologController, :index
get "/:network", NetworkController, :index
get "/:network/:chan", IrcController, :index
get "/:network/:chan/txt", IrcController, :txt
get "/:network/:chan/txt/:name", IrcController, :txt
get "/:network/:channel/preums", IrcController, :preums
get "/:network/:chan/alcoolog", AlcoologController, :index
get "/:network/:chan/alcoolog/t/:token", AlcoologController, :token
get "/:network/alcoolog/~/:nick", AlcoologController, :nick
end
end
|