From 0fdece68c07836a566909d75a7f3836f229334b5 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Tue, 17 May 2022 13:29:12 -0600 Subject: Add /v2/assets/ handler, with resizing --- srv/src/api/api.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'srv/src/api/api.go') 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) -- cgit v1.2.3