summaryrefslogtreecommitdiff
path: root/srv/src/http/posts.go
diff options
context:
space:
mode:
Diffstat (limited to 'srv/src/http/posts.go')
-rw-r--r--srv/src/http/posts.go16
1 files changed, 15 insertions, 1 deletions
diff --git a/srv/src/http/posts.go b/srv/src/http/posts.go
index daa756c..c05f3de 100644
--- a/srv/src/http/posts.go
+++ b/srv/src/http/posts.go
@@ -205,7 +205,21 @@ func (a *api) renderEditPostHandler() http.Handler {
}
}
- executeTemplate(rw, r, tpl, storedPost)
+ tags, err := a.params.PostStore.GetTags()
+ if err != nil {
+ apiutil.InternalServerError(rw, r, fmt.Errorf("fetching tags: %w", err))
+ return
+ }
+
+ tplPayload := struct {
+ Post post.StoredPost
+ Tags []string
+ }{
+ Post: storedPost,
+ Tags: tags,
+ }
+
+ executeTemplate(rw, r, tpl, tplPayload)
})
}