summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Picciano <mediocregopher@gmail.com>2022-05-20 11:20:02 -0600
committerBrian Picciano <mediocregopher@gmail.com>2022-05-20 11:20:02 -0600
commit3cdee89c961ae9c836234f5aec87174a04a800a8 (patch)
tree8e7e314f6d601a6a0eb24e346b084b0144d4efb8
parent09acb111a2b22f5794541fac175b024dd0f9100e (diff)
Put post preview behind auth
-rw-r--r--srv/src/http/api.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/srv/src/http/api.go b/srv/src/http/api.go
index bbf4419..4740853 100644
--- a/srv/src/http/api.go
+++ b/srv/src/http/api.go
@@ -222,7 +222,9 @@ func (a *api) handler() http.Handler {
"DELETE": authMiddleware(auther,
formMiddleware(a.deletePostHandler()),
),
- "PREVIEW": formMiddleware(a.previewPostHandler()),
+ "PREVIEW": authMiddleware(auther,
+ formMiddleware(a.previewPostHandler()),
+ ),
}),
))
v2Mux.Handle("/assets/", http.StripPrefix("/assets",