diff options
author | Brian Picciano <mediocregopher@gmail.com> | 2022-05-20 10:13:46 -0600 |
---|---|---|
committer | Brian Picciano <mediocregopher@gmail.com> | 2022-05-20 10:13:46 -0600 |
commit | 75044eef0331bb9448da813288aafc6735ce7c22 (patch) | |
tree | a2fb34b0811cb524d87016e968255d2b6771d06d /srv/src/api/assets.go | |
parent | 0bc0204f0b718464d7ea9d97d6d03ee81f1953c6 (diff) |
Implement edit post page
Diffstat (limited to 'srv/src/api/assets.go')
-rw-r--r-- | srv/src/api/assets.go | 4 |
1 files changed, 2 insertions, 2 deletions
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 } |