diff options
author | Kegsay <kegan@matrix.org> | 2020-08-27 18:53:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-27 18:53:40 +0100 |
commit | 9af2f5f1f253a821cec660ef477c274d5cd13953 (patch) | |
tree | 998ff675429077b8db11142f15cb2fe1417f0194 /internal | |
parent | c0f28845f8715b13b4df8728909c7a55e0a2c63a (diff) |
Remove device DB from clientapi (#1352)
* Remove device DB from clientapi
* Remove device DB from startup configuration
It's all an impl detail now in user API
Diffstat (limited to 'internal')
-rw-r--r-- | internal/setup/base.go | 12 | ||||
-rw-r--r-- | internal/setup/monolith.go | 4 |
2 files changed, 1 insertions, 15 deletions
diff --git a/internal/setup/base.go b/internal/setup/base.go index fc408311..7bf06e74 100644 --- a/internal/setup/base.go +++ b/internal/setup/base.go @@ -32,7 +32,6 @@ import ( "github.com/matrix-org/dendrite/internal" "github.com/matrix-org/dendrite/userapi/storage/accounts" - "github.com/matrix-org/dendrite/userapi/storage/devices" "github.com/Shopify/sarama" "github.com/gorilla/mux" @@ -237,17 +236,6 @@ func (b *BaseDendrite) KeyServerHTTPClient() keyserverAPI.KeyInternalAPI { return f } -// CreateDeviceDB creates a new instance of the device database. Should only be -// called once per component. -func (b *BaseDendrite) CreateDeviceDB() devices.Database { - db, err := devices.NewDatabase(&b.Cfg.UserAPI.DeviceDatabase, b.Cfg.Global.ServerName) - if err != nil { - logrus.WithError(err).Panicf("failed to connect to devices db") - } - - return db -} - // CreateAccountsDB creates a new instance of the accounts database. Should only // be called once per component. func (b *BaseDendrite) CreateAccountsDB() accounts.Database { diff --git a/internal/setup/monolith.go b/internal/setup/monolith.go index 5e6c8fcf..f79ebae4 100644 --- a/internal/setup/monolith.go +++ b/internal/setup/monolith.go @@ -33,7 +33,6 @@ import ( "github.com/matrix-org/dendrite/syncapi" userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/dendrite/userapi/storage/accounts" - "github.com/matrix-org/dendrite/userapi/storage/devices" "github.com/matrix-org/gomatrixserverlib" ) @@ -41,7 +40,6 @@ import ( // all components of Dendrite, for use in monolith mode. type Monolith struct { Config *config.Dendrite - DeviceDB devices.Database AccountDB accounts.Database KeyRing *gomatrixserverlib.KeyRing Client *gomatrixserverlib.Client @@ -65,7 +63,7 @@ type Monolith struct { // AddAllPublicRoutes attaches all public paths to the given router func (m *Monolith) AddAllPublicRoutes(csMux, ssMux, keyMux, mediaMux *mux.Router) { clientapi.AddPublicRoutes( - csMux, &m.Config.ClientAPI, m.KafkaProducer, m.DeviceDB, m.AccountDB, + csMux, &m.Config.ClientAPI, m.KafkaProducer, m.AccountDB, m.FedClient, m.RoomserverAPI, m.EDUInternalAPI, m.AppserviceAPI, m.StateAPI, transactions.New(), m.FederationSenderAPI, m.UserAPI, m.KeyAPI, m.ExtPublicRoomsProvider, |