summaryrefslogtreecommitdiff
path: root/src/http/posts.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/posts.go')
-rw-r--r--src/http/posts.go19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/http/posts.go b/src/http/posts.go
index daaaafc..8488996 100644
--- a/src/http/posts.go
+++ b/src/http/posts.go
@@ -30,13 +30,6 @@ func (a *api) postPreprocessFuncImage(args ...string) (string, error) {
}
tpl := txttpl.New("image.html")
-
- tpl.Funcs(txttpl.FuncMap{
- "AssetURL": func(id string) string {
- return a.assetURL(id, false)
- },
- })
-
tpl = txttpl.Must(tpl.Parse(mustReadTplFile("image.html")))
tplPayload := struct {
@@ -189,7 +182,9 @@ func (a *api) postPostHandler() http.Handler {
return
}
- a.executeRedirectTpl(rw, r, a.editPostURL(p.ID, false))
+ a.executeRedirectTpl(
+ rw, r, a.urlBuilder.Post(p.ID).MethodEdit().String(),
+ )
})
}
@@ -223,9 +218,13 @@ func (a *api) deletePostHandler(isDraft bool) http.Handler {
}
if isDraft {
- a.executeRedirectTpl(rw, r, a.manageDraftPostsURL(false))
+ a.executeRedirectTpl(
+ rw, r, a.urlBuilder.Drafts().MethodManage().String(),
+ )
} else {
- a.executeRedirectTpl(rw, r, a.managePostsURL(false))
+ a.executeRedirectTpl(
+ rw, r, a.urlBuilder.Posts().MethodManage().String(),
+ )
}
})
}