mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-30 04:52:46 +00:00
Make federationapi use userapi (#1135)
Removes dependencies on account DB, device DB and ASAPI.
This commit is contained in:
parent
45011579eb
commit
1942928ee5
12 changed files with 102 additions and 66 deletions
|
@ -24,18 +24,16 @@ func main() {
|
|||
base := setup.NewBaseDendrite(cfg, "FederationAPI", true)
|
||||
defer base.Close() // nolint: errcheck
|
||||
|
||||
accountDB := base.CreateAccountsDB()
|
||||
deviceDB := base.CreateDeviceDB()
|
||||
userAPI := base.UserAPIClient()
|
||||
federation := base.CreateFederationClient()
|
||||
serverKeyAPI := base.ServerKeyAPIClient()
|
||||
keyRing := serverKeyAPI.KeyRing()
|
||||
fsAPI := base.FederationSenderHTTPClient()
|
||||
rsAPI := base.RoomserverHTTPClient()
|
||||
asAPI := base.AppserviceHTTPClient()
|
||||
|
||||
federationapi.AddPublicRoutes(
|
||||
base.PublicAPIMux, base.Cfg, accountDB, deviceDB, federation, keyRing,
|
||||
rsAPI, asAPI, fsAPI, base.EDUServerClient(),
|
||||
base.PublicAPIMux, base.Cfg, userAPI, federation, keyRing,
|
||||
rsAPI, fsAPI, base.EDUServerClient(),
|
||||
)
|
||||
|
||||
base.SetupAndServeHTTP(string(base.Cfg.Bind.FederationAPI), string(base.Cfg.Listen.FederationAPI))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue