summaryrefslogtreecommitdiff
path: root/lib/lsg_web
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lsg_web')
-rw-r--r--lib/lsg_web/router.ex22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/lsg_web/router.ex b/lib/lsg_web/router.ex
index 5fcf0a8..dc49c9f 100644
--- a/lib/lsg_web/router.ex
+++ b/lib/lsg_web/router.ex
@@ -15,6 +15,12 @@ defmodule LSGWeb.Router do
plug :accepts, ["json", "sse"]
end
+ pipeline :matrix_app_service do
+ plug :accepts, ["json"]
+ plug LSG.Matrix.Plug.Auth
+ plug LSG.Matrix.Plug.SetConfig
+ end
+
scope "/api", LSGWeb do
pipe_through :api
get "/irc-auth.sse", IrcAuthSseController, :sse
@@ -50,4 +56,20 @@ defmodule LSGWeb.Router do
get "/:network/:chan/alcoolog/t/:token", AlcoologController, :token
end
+ scope "/_matrix/appservice", MatrixAppServiceWeb.V1, as: :matrix do
+ pipe_through :matrix_app_service
+
+ put "/transactions/:txn_id", TransactionController, :push
+
+ get "/users/:user_id", UserController, :query
+ get "/rooms/:room_alias", RoomController, :query
+
+ get "/thirdparty/protocol/:protocol", ThirdPartyController, :query_protocol
+ get "/thirdparty/user/:protocol", ThirdPartyController, :query_users
+ get "/thirdparty/location/:protocol", ThirdPartyController, :query_locations
+ get "/thirdparty/location", ThirdPartyController, :query_location_by_alias
+ get "/thirdparty/user", ThirdPartyController, :query_user_by_id
+ end
+
+
end