aboutsummaryrefslogtreecommitdiff
path: root/mediaapi/mediaapi.go
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2023-03-17 12:09:45 +0100
committerGitHub <noreply@github.com>2023-03-17 11:09:45 +0000
commit5579121c6f27105342a2aea05cf9a3119d73cecb (patch)
tree1d8b7bec90079b6f693585d306c19019ea426870 /mediaapi/mediaapi.go
parentd88f71ab71a60348518f7fa6735ac9f0bfb472c3 (diff)
Preparations for removing `BaseDendrite` (#3016)
Preparations to actually remove/replace `BaseDendrite`. Quite a few changes: - SyncAPI accepts an `fulltext.Indexer` interface (fulltext is removed from `BaseDendrite`) - Caches are removed from `BaseDendrite` - Introduces a `Router` struct (likely to change) - also fixes #2903 - Introduces a `sqlutil.ConnectionManager`, which should remove `base.DatabaseConnection` later on - probably more
Diffstat (limited to 'mediaapi/mediaapi.go')
-rw-r--r--mediaapi/mediaapi.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/mediaapi/mediaapi.go b/mediaapi/mediaapi.go
index 4792c996..42e0ea88 100644
--- a/mediaapi/mediaapi.go
+++ b/mediaapi/mediaapi.go
@@ -32,12 +32,12 @@ func AddPublicRoutes(
cfg := &base.Cfg.MediaAPI
rateCfg := &base.Cfg.ClientAPI.RateLimiting
- mediaDB, err := storage.NewMediaAPIDatasource(base, &cfg.Database)
+ mediaDB, err := storage.NewMediaAPIDatasource(base.ConnectionManager, &cfg.Database)
if err != nil {
logrus.WithError(err).Panicf("failed to connect to media db")
}
routing.Setup(
- base.PublicMediaAPIMux, cfg, rateCfg, mediaDB, userAPI, client,
+ base.Routers.Media, cfg, rateCfg, mediaDB, userAPI, client,
)
}