aboutsummaryrefslogtreecommitdiff
path: root/syncapi
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-06-08 15:51:07 +0100
committerGitHub <noreply@github.com>2020-06-08 15:51:07 +0100
commit4f171c56a832c836b0eb21650ee84d56e451dd6a (patch)
treee92059f1dbb784c978b60897d6ac13983d51c1b4 /syncapi
parentcdb9a115715bd5a9e84df5bc95060e2dac1f6d89 (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 'syncapi')
-rw-r--r--syncapi/syncapi.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/syncapi/syncapi.go b/syncapi/syncapi.go
index 762f4e9d..6e84dcb6 100644
--- a/syncapi/syncapi.go
+++ b/syncapi/syncapi.go
@@ -17,6 +17,7 @@ package syncapi
import (
"context"
+ "github.com/gorilla/mux"
"github.com/sirupsen/logrus"
"github.com/matrix-org/dendrite/clientapi/auth/storage/accounts"
@@ -32,9 +33,10 @@ import (
"github.com/matrix-org/dendrite/syncapi/sync"
)
-// SetupSyncAPIComponent sets up and registers HTTP handlers for the SyncAPI
+// AddPublicRoutes sets up and registers HTTP handlers for the SyncAPI
// component.
-func SetupSyncAPIComponent(
+func AddPublicRoutes(
+ router *mux.Router,
base *basecomponent.BaseDendrite,
deviceDB devices.Database,
accountsDB accounts.Database,
@@ -88,5 +90,5 @@ func SetupSyncAPIComponent(
logrus.WithError(err).Panicf("failed to start send-to-device consumer")
}
- routing.Setup(base.PublicAPIMux, requestPool, syncDB, deviceDB, federation, rsAPI, cfg)
+ routing.Setup(router, requestPool, syncDB, deviceDB, federation, rsAPI, cfg)
}