summaryrefslogtreecommitdiff
path: root/srv/src/api/api.go
diff options
context:
space:
mode:
authorBrian Picciano <mediocregopher@gmail.com>2022-05-20 10:47:22 -0600
committerBrian Picciano <mediocregopher@gmail.com>2022-05-20 10:47:22 -0600
commit2c4b617ddeb71a5856075c94dcc7dfff3cfcbcaa (patch)
tree66ea2c37d91e51c7b426d13db0203e5851c66bfc /srv/src/api/api.go
parent75044eef0331bb9448da813288aafc6735ce7c22 (diff)
Implement saving of new and edited posts
Diffstat (limited to 'srv/src/api/api.go')
-rw-r--r--srv/src/api/api.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/srv/src/api/api.go b/srv/src/api/api.go
index bc56164..adecff5 100644
--- a/srv/src/api/api.go
+++ b/srv/src/api/api.go
@@ -216,6 +216,9 @@ func (a *api) handler() http.Handler {
apiutil.MethodMux(map[string]http.Handler{
"GET": a.renderPostHandler(),
"EDIT": a.editPostHandler(),
+ "POST": authMiddleware(auther,
+ formMiddleware(a.postPostHandler()),
+ ),
"DELETE": authMiddleware(auther,
formMiddleware(a.deletePostHandler()),
),