summaryrefslogtreecommitdiffstats
path: root/api4/post.go
diff options
context:
space:
mode:
Diffstat (limited to 'api4/post.go')
-rw-r--r--api4/post.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/api4/post.go b/api4/post.go
index 7bfe5ad64..65a508df7 100644
--- a/api4/post.go
+++ b/api4/post.go
@@ -302,6 +302,10 @@ func searchPosts(c *Context, w http.ResponseWriter, r *http.Request) {
func updatePost(c *Context, w http.ResponseWriter, r *http.Request) {
c.RequirePostId()
+ if c.Err != nil {
+ return
+ }
+
post := model.PostFromJson(r.Body)
if post == nil {