From d0ffb745468d7fba08765002b3fa4ab4b4ee7e35 Mon Sep 17 00:00:00 2001 From: Jan-Lukas Else Date: Sun, 24 Oct 2021 18:27:00 +0200 Subject: [PATCH] Fix editing of post homepage --- micropub.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/micropub.go b/micropub.go index ac46e38..3a2ad51 100644 --- a/micropub.go +++ b/micropub.go @@ -473,7 +473,12 @@ func (a *goBlog) micropubUpdate(w http.ResponseWriter, r *http.Request, u string a.serveError(w, r, err.Error(), http.StatusBadRequest) return } - p, err := a.getPost(uu.Path) + ppath := uu.Path + if ppath == "" { + // Probably homepage "/" + ppath = "/" + } + p, err := a.getPost(ppath) if err != nil { a.serveError(w, r, err.Error(), http.StatusBadRequest) return