Fix editing of post homepage

This commit is contained in:
Jan-Lukas Else 2021-10-24 18:27:00 +02:00
parent 64732af4d3
commit d0ffb74546
1 changed files with 6 additions and 1 deletions

View File

@ -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