diff options
author | href <href@random.sh> | 2021-09-04 05:41:09 +0200 |
---|---|---|
committer | href <href@random.sh> | 2021-09-04 05:41:09 +0200 |
commit | 735a8dd998b2c0aebde9c96daefc7aa2c223218e (patch) | |
tree | 4a165897c8557065dfab401455943524087f79af /lib/lsg_web | |
parent | chat_live improvements (diff) |
matrix appservice, puppet improvements
Diffstat (limited to '')
-rw-r--r-- | lib/lsg_web/router.ex | 22 |
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 |