summaryrefslogtreecommitdiff
path: root/src/cmd/mediocre-blog/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/mediocre-blog/main.go')
-rw-r--r--src/cmd/mediocre-blog/main.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/cmd/mediocre-blog/main.go b/src/cmd/mediocre-blog/main.go
index aff0f8e..ee09f92 100644
--- a/src/cmd/mediocre-blog/main.go
+++ b/src/cmd/mediocre-blog/main.go
@@ -101,7 +101,13 @@ func main() {
defer postSQLDB.Close()
postStore := post.NewStore(postSQLDB)
+
postAssetStore := asset.NewStore(postSQLDB)
+
+ postAssetLoader := asset.NewStoreLoader(postAssetStore)
+ postAssetLoader = asset.NewArchiveLoader(postAssetLoader)
+ postAssetLoader = asset.NewImageLoader(postAssetLoader)
+
postDraftStore := post.NewDraftStore(postSQLDB)
cache := cache.New(5000)
@@ -111,6 +117,7 @@ func main() {
httpParams.PowManager = powMgr
httpParams.PostStore = postStore
httpParams.PostAssetStore = postAssetStore
+ httpParams.PostAssetLoader = postAssetLoader
httpParams.PostDraftStore = postDraftStore
httpParams.MailingList = ml
httpParams.GeminiPublicURL = gmiParams.PublicURL
@@ -132,7 +139,7 @@ func main() {
gmiParams.Logger = logger.WithNamespace("gmi")
gmiParams.Cache = cache
gmiParams.PostStore = postStore
- gmiParams.PostAssetStore = postAssetStore
+ gmiParams.PostAssetLoader = postAssetLoader
gmiParams.HTTPPublicURL = httpParams.PublicURL
logger.Info(ctx, "starting gmi api")