Fix some cache errors with editor

This commit is contained in:
Caleb Gardner
2024-11-14 11:37:23 -06:00
parent 7c7f3bd131
commit b37fb8a7cf
3 changed files with 14 additions and 10 deletions
+2 -2
View File
@@ -166,7 +166,7 @@ func editorEdit(w http.ResponseWriter, r *http.Request) {
if blogID == "new" {
bl = &blog.Blog{}
} else {
bl, err = blogApp.Blog(r.Context(), r.URL.Query().Get("blog"))
bl, err = blogApp.Blog(r.Context(), r.URL.Query().Get("blog"), false)
if err != nil {
log.Println("error getting blog for editor:", err)
sendContent(w, r, "ERROR", "", "")
@@ -252,7 +252,7 @@ func editorPost(w http.ResponseWriter, r *http.Request) {
sendContent(w, r, "<p>Server error updating blog</p>", "", "")
return
}
old, err := blogApp.Blog(r.Context(), newBlog.ID)
old, err := blogApp.Blog(r.Context(), newBlog.ID, false)
if err != nil {
log.Println("error getting old blog to be updated:", err)
sendContent(w, r, "<p>Updated!</p>", "", "")