summaryrefslogtreecommitdiff
path: root/srv/src/api/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'srv/src/api/api.go')
-rw-r--r--srv/src/api/api.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/srv/src/api/api.go b/srv/src/api/api.go
index 79979be..37ea1fc 100644
--- a/srv/src/api/api.go
+++ b/srv/src/api/api.go
@@ -26,7 +26,8 @@ type Params struct {
Logger *mlog.Logger
PowManager pow.Manager
- PostStore post.Store
+ PostStore post.Store
+ PostAssetStore post.AssetStore
MailingList mailinglist.MailingList
@@ -192,6 +193,8 @@ func (a *api) handler() http.Handler {
mux.Handle("/v2/posts/", a.renderPostHandler())
mux.Handle("/v2/", a.renderIndexHandler())
+ mux.Handle("/v2/assets/", a.servePostAssetHandler())
+
var globalHandler http.Handler = mux
globalHandler = setLoggerMiddleware(a.params.Logger, globalHandler)