summaryrefslogtreecommitdiff
path: root/lib/lsg_web/router.ex
diff options
context:
space:
mode:
authorhref <href@random.sh>2020-07-07 21:39:10 +0200
committerhref <href@random.sh>2020-07-07 21:39:51 +0200
commitd6ee134a5957e299c3ad59011df320b3c41e6e61 (patch)
tree29567e6635466f8a3415a935b3cc8a777019f5bc /lib/lsg_web/router.ex
parentbleh (diff)
pouet
Diffstat (limited to '')
-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