summaryrefslogtreecommitdiff
path: root/lib/lsg_web/router.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lsg_web/router.ex')
-rw-r--r--lib/lsg_web/router.ex35
1 files changed, 23 insertions, 12 deletions
diff --git a/lib/lsg_web/router.ex b/lib/lsg_web/router.ex
index a834083..de7fafb 100644
--- a/lib/lsg_web/router.ex
+++ b/lib/lsg_web/router.ex
@@ -3,8 +3,8 @@ defmodule LSGWeb.Router do
pipeline :browser do
plug :accepts, ["html", "txt"]
- #plug :fetch_session
- #plug :fetch_flash
+ plug :fetch_session
+ plug :fetch_flash
#plug :protect_from_forgery
#plug :put_secure_browser_headers
end
@@ -13,22 +13,33 @@ defmodule LSGWeb.Router 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 "/irc", IrcController, :index
- get "/irc/txt", IrcController, :txt
- get "/irc/txt/:name", IrcController, :txt
- get "/irc/alcoolog/:channel", AlcoologController, :index
- get "/irc/alcoolog/~/:nick", AlcoologController, :nick
+ 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
- scope "/api", LSGWeb do
- pipe_through :api
- get "/icecast.json", PageController, :icecast
- get "/icecast.sse", IcecastSseController, :sse
- end
end