Fix metadata update redirect on single-user instances

Fixes #50
This commit is contained in:
Matt Baer 2018-12-24 10:33:40 -05:00
parent 1439c8c359
commit 7f5551105a
1 changed files with 4 additions and 0 deletions

View File

@ -686,6 +686,10 @@ func existingPost(app *app, w http.ResponseWriter, r *http.Request) error {
collPre = ""
}
redirect = collPre + "/" + pRes.Slug.String + "/edit/meta"
} else {
if app.cfg.App.SingleUser {
redirect = "/d" + redirect
}
}
w.Header().Set("Location", redirect)
w.WriteHeader(http.StatusFound)