From e009505cb32c2dfc8f92bfdd4386584609dccab6 Mon Sep 17 00:00:00 2001 From: Niko Abeler Date: Tue, 29 Nov 2022 20:47:33 +0100 Subject: [PATCH] reject empty post_type --- cmd/owl/web/editor_handler.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/owl/web/editor_handler.go b/cmd/owl/web/editor_handler.go index 77b6f1e..fa34ba3 100644 --- a/cmd/owl/web/editor_handler.go +++ b/cmd/owl/web/editor_handler.go @@ -206,6 +206,10 @@ func userEditorPostHandler(repo *owl.Repository) func(http.ResponseWriter, *http userEditorGetHandler(repo)(w, r, ps) return } + if post_type == "" { + userEditorGetHandler(repo)(w, r, ps) + return + } // create post post, err := user.CreateNewPostFull(owl.PostMeta{