summaryrefslogtreecommitdiff
path: root/lib/lsg_web
diff options
context:
space:
mode:
authorhref <href@random.sh>2021-09-04 05:41:09 +0200
committerhref <href@random.sh>2021-09-04 05:41:09 +0200
commit735a8dd998b2c0aebde9c96daefc7aa2c223218e (patch)
tree4a165897c8557065dfab401455943524087f79af /lib/lsg_web
parentchat_live improvements (diff)
matrix appservice, puppet improvements
Diffstat (limited to '')
-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