mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-30 04:52:46 +00:00
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
This commit is contained in:
parent
cdb9a11571
commit
4f171c56a8
25 changed files with 171 additions and 138 deletions
|
@ -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,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue