From 75044eef0331bb9448da813288aafc6735ce7c22 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Fri, 20 May 2022 10:13:46 -0600 Subject: Implement edit post page --- srv/src/api/assets.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'srv/src/api/assets.go') diff --git a/srv/src/api/assets.go b/srv/src/api/assets.go index c1cd75e..47be14c 100644 --- a/srv/src/api/assets.go +++ b/srv/src/api/assets.go @@ -149,7 +149,7 @@ func (a *api) postPostAssetHandler() http.Handler { return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { id := r.PostFormValue("id") - if id == "" { + if id == "/" { apiutil.BadRequest(rw, r, errors.New("id is required")) return } @@ -176,7 +176,7 @@ func (a *api) deletePostAssetHandler() http.Handler { id := filepath.Base(r.URL.Path) - if id == "" { + if id == "/" { apiutil.BadRequest(rw, r, errors.New("id is required")) return } -- cgit v1.2.3