aboutsummaryrefslogtreecommitdiff
path: root/cmd/dendrite-polylith-multi
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2022-05-03 17:17:02 +0100
committerGitHub <noreply@github.com>2022-05-03 17:17:02 +0100
commitdd061a172e97005a4a7a4c37db6caf3f77c10d51 (patch)
tree6603b4825a7c5c335b8b9041339ed2ddd7d91c56 /cmd/dendrite-polylith-multi
parent4ad5f9c982fe5dc9e306a9269621ead8c31248cf (diff)
Tidy up `AddPublicRoutes` (#2412)
* Simplify federation API `AddPublicRoutes` * Simplify client API `AddPublicRoutes` * Simplify media API `AddPublicRoutes` * Simplify sync API `AddPublicRoutes` * Simplify `AddAllPublicRoutes`
Diffstat (limited to 'cmd/dendrite-polylith-multi')
-rw-r--r--cmd/dendrite-polylith-multi/personalities/clientapi.go6
-rw-r--r--cmd/dendrite-polylith-multi/personalities/federationapi.go7
-rw-r--r--cmd/dendrite-polylith-multi/personalities/mediaapi.go3
-rw-r--r--cmd/dendrite-polylith-multi/personalities/syncapi.go4
4 files changed, 8 insertions, 12 deletions
diff --git a/cmd/dendrite-polylith-multi/personalities/clientapi.go b/cmd/dendrite-polylith-multi/personalities/clientapi.go
index 7ed2075a..a5d69d07 100644
--- a/cmd/dendrite-polylith-multi/personalities/clientapi.go
+++ b/cmd/dendrite-polylith-multi/personalities/clientapi.go
@@ -31,11 +31,9 @@ func ClientAPI(base *basepkg.BaseDendrite, cfg *config.Dendrite) {
keyAPI := base.KeyServerHTTPClient()
clientapi.AddPublicRoutes(
- base.ProcessContext, base.PublicClientAPIMux,
- base.SynapseAdminMux, base.DendriteAdminMux,
- &base.Cfg.ClientAPI, federation, rsAPI, asQuery,
+ base, federation, rsAPI, asQuery,
transactions.New(), fsAPI, userAPI, userAPI,
- keyAPI, nil, &cfg.MSCs,
+ keyAPI, nil,
)
base.SetupAndServeHTTP(
diff --git a/cmd/dendrite-polylith-multi/personalities/federationapi.go b/cmd/dendrite-polylith-multi/personalities/federationapi.go
index b82577ce..6377ce9e 100644
--- a/cmd/dendrite-polylith-multi/personalities/federationapi.go
+++ b/cmd/dendrite-polylith-multi/personalities/federationapi.go
@@ -29,10 +29,9 @@ func FederationAPI(base *basepkg.BaseDendrite, cfg *config.Dendrite) {
keyRing := fsAPI.KeyRing()
federationapi.AddPublicRoutes(
- base.ProcessContext, base.PublicFederationAPIMux, base.PublicKeyAPIMux, base.PublicWellKnownAPIMux,
- &base.Cfg.FederationAPI, userAPI, federation, keyRing,
- rsAPI, fsAPI, keyAPI,
- &base.Cfg.MSCs, nil,
+ base,
+ userAPI, federation, keyRing,
+ rsAPI, fsAPI, keyAPI, nil,
)
federationapi.AddInternalRoutes(base.InternalAPIMux, fsAPI)
diff --git a/cmd/dendrite-polylith-multi/personalities/mediaapi.go b/cmd/dendrite-polylith-multi/personalities/mediaapi.go
index 8c0bfa19..69d5fd5a 100644
--- a/cmd/dendrite-polylith-multi/personalities/mediaapi.go
+++ b/cmd/dendrite-polylith-multi/personalities/mediaapi.go
@@ -25,8 +25,7 @@ func MediaAPI(base *basepkg.BaseDendrite, cfg *config.Dendrite) {
client := base.CreateClient()
mediaapi.AddPublicRoutes(
- base, base.PublicMediaAPIMux, &base.Cfg.MediaAPI, &base.Cfg.ClientAPI.RateLimiting,
- userAPI, client,
+ base, userAPI, client,
)
base.SetupAndServeHTTP(
diff --git a/cmd/dendrite-polylith-multi/personalities/syncapi.go b/cmd/dendrite-polylith-multi/personalities/syncapi.go
index f9f1c5a0..2245b9b5 100644
--- a/cmd/dendrite-polylith-multi/personalities/syncapi.go
+++ b/cmd/dendrite-polylith-multi/personalities/syncapi.go
@@ -28,9 +28,9 @@ func SyncAPI(base *basepkg.BaseDendrite, cfg *config.Dendrite) {
syncapi.AddPublicRoutes(
base,
- base.PublicClientAPIMux, userAPI, rsAPI,
+ userAPI, rsAPI,
base.KeyServerHTTPClient(),
- federation, &cfg.SyncAPI,
+ federation,
)
base.SetupAndServeHTTP(