Fixing some stuff

This commit is contained in:
Caleb Gardner
2024-11-16 07:19:16 -06:00
parent 3670f1b7a9
commit 9edd91148a
3 changed files with 28 additions and 15 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(), blogID, false)
bl, err = blogApp.AnyBlog(r.Context(), blogID)
if err != nil {
log.Println("error getting blog for editor:", err)
log.Println(blogID)
@@ -250,7 +250,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, false)
old, err := blogApp.AnyBlog(r.Context(), newBlog.ID)
if err != nil {
log.Println("error getting old blog to be updated:", err)
sendContent(w, r, "<p>Updated!</p>", "", "")