Fixed misplaced if err != nil {} in mindflow page handlers.
This commit is contained in:
parent
76830d4468
commit
2938f26f3a
@ -53,24 +53,24 @@ func (h *Handlers) Stuff(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
func (h *Handlers) Mindflow(w http.ResponseWriter, r *http.Request) {
|
func (h *Handlers) Mindflow(w http.ResponseWriter, r *http.Request) {
|
||||||
posts, err := h.mindflowDB.GetAll()
|
posts, err := h.mindflowDB.GetAll()
|
||||||
for _, entry := range posts {
|
|
||||||
entry.Body = strings.ReplaceAll(entry.Body, "\\n", "\n")
|
|
||||||
}
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
for _, entry := range posts {
|
||||||
|
entry.Body = strings.ReplaceAll(entry.Body, "\\n", "\n")
|
||||||
|
}
|
||||||
|
|
||||||
web.Mindflow("/ Mindflow", posts, r, w)
|
web.Mindflow("/ Mindflow", posts, r, w)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *Handlers) MindflowAdmin(w http.ResponseWriter, r *http.Request) {
|
func (h *Handlers) MindflowAdmin(w http.ResponseWriter, r *http.Request) {
|
||||||
posts, err := h.mindflowDB.GetAll()
|
posts, err := h.mindflowDB.GetAll()
|
||||||
for _, entry := range posts {
|
|
||||||
entry.Body = strings.ReplaceAll(entry.Body, "\\n", "\n")
|
|
||||||
}
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
for _, entry := range posts {
|
||||||
|
entry.Body = strings.ReplaceAll(entry.Body, "\\n", "\n")
|
||||||
|
}
|
||||||
|
|
||||||
web.MindflowAdmin("/ Mindflow Administration", posts, r, w)
|
web.MindflowAdmin("/ Mindflow Administration", posts, r, w)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user