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,18 +15,18 @@
|
|||
package keyserver
|
||||
|
||||
import (
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/matrix-org/dendrite/clientapi/auth/storage/accounts"
|
||||
"github.com/matrix-org/dendrite/clientapi/auth/storage/devices"
|
||||
"github.com/matrix-org/dendrite/internal/basecomponent"
|
||||
"github.com/matrix-org/dendrite/internal/config"
|
||||
"github.com/matrix-org/dendrite/keyserver/routing"
|
||||
)
|
||||
|
||||
// SetupFederationSenderComponent sets up and registers HTTP handlers for the
|
||||
// FederationSender component.
|
||||
func SetupKeyServerComponent(
|
||||
base *basecomponent.BaseDendrite,
|
||||
// AddPublicRoutes registers HTTP handlers for CS API calls
|
||||
func AddPublicRoutes(
|
||||
router *mux.Router, cfg *config.Dendrite,
|
||||
deviceDB devices.Database,
|
||||
accountsDB accounts.Database,
|
||||
) {
|
||||
routing.Setup(base.PublicAPIMux, base.Cfg, accountsDB, deviceDB)
|
||||
routing.Setup(router, cfg, accountsDB, deviceDB)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue