diff options
author | Kegsay <kegan@matrix.org> | 2020-06-08 15:51:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-08 15:51:07 +0100 |
commit | 4f171c56a832c836b0eb21650ee84d56e451dd6a (patch) | |
tree | e92059f1dbb784c978b60897d6ac13983d51c1b4 /clientapi/clientapi.go | |
parent | cdb9a115715bd5a9e84df5bc95060e2dac1f6d89 (diff) |
Split out SetupFooComponent (#1106)
* Split out adding HTTP routes from making internal APIs for clarity
* Split out more components
* Split out more things
* Finish converting
* internal mux for internal routes
Diffstat (limited to 'clientapi/clientapi.go')
-rw-r--r-- | clientapi/clientapi.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/clientapi/clientapi.go b/clientapi/clientapi.go index 0ce44c21..d00be6eb 100644 --- a/clientapi/clientapi.go +++ b/clientapi/clientapi.go @@ -15,6 +15,7 @@ package clientapi import ( + "github.com/gorilla/mux" appserviceAPI "github.com/matrix-org/dendrite/appservice/api" "github.com/matrix-org/dendrite/clientapi/auth/storage/accounts" "github.com/matrix-org/dendrite/clientapi/auth/storage/devices" @@ -30,9 +31,9 @@ import ( "github.com/sirupsen/logrus" ) -// SetupClientAPIComponent sets up and registers HTTP handlers for the ClientAPI -// component. -func SetupClientAPIComponent( +// AddPublicRoutes sets up and registers HTTP handlers for the ClientAPI component. +func AddPublicRoutes( + router *mux.Router, base *basecomponent.BaseDendrite, deviceDB devices.Database, accountsDB accounts.Database, @@ -65,7 +66,7 @@ func SetupClientAPIComponent( } routing.Setup( - base.PublicAPIMux, base.Cfg, roomserverProducer, rsAPI, asAPI, + router, base.Cfg, roomserverProducer, rsAPI, asAPI, accountsDB, deviceDB, federation, *keyRing, userUpdateProducer, syncProducer, eduProducer, transactionsCache, fsAPI, ) |