diff --git a/internal/http/handlers.go b/internal/http/handlers.go index 79e5c5e..001aef7 100644 --- a/internal/http/handlers.go +++ b/internal/http/handlers.go @@ -53,24 +53,24 @@ func (h *Handlers) Stuff(w http.ResponseWriter, r *http.Request) { func (h *Handlers) Mindflow(w http.ResponseWriter, r *http.Request) { posts, err := h.mindflowDB.GetAll() - for _, entry := range posts { - entry.Body = strings.ReplaceAll(entry.Body, "\\n", "\n") - } if err != nil { return } + for _, entry := range posts { + entry.Body = strings.ReplaceAll(entry.Body, "\\n", "\n") + } web.Mindflow("/ Mindflow", posts, r, w) } func (h *Handlers) MindflowAdmin(w http.ResponseWriter, r *http.Request) { posts, err := h.mindflowDB.GetAll() - for _, entry := range posts { - entry.Body = strings.ReplaceAll(entry.Body, "\\n", "\n") - } if err != nil { return } + for _, entry := range posts { + entry.Body = strings.ReplaceAll(entry.Body, "\\n", "\n") + } web.MindflowAdmin("/ Mindflow Administration", posts, r, w) }