diff --git a/internal/http/handlers.go b/internal/http/handlers.go index 90a1a2f..31a59ce 100644 --- a/internal/http/handlers.go +++ b/internal/http/handlers.go @@ -146,9 +146,15 @@ func (h *Handlers) GuestbookAdmin(w http.ResponseWriter, r *http.Request) { } func (h *Handlers) RSS(w http.ResponseWriter, r *http.Request) { - posts := []mindflow.Post{ - {Category: mindflow.Category{ID: 1, Name: "Update"}, Date: time.Now(), Title: "LMAO", Body: "Testing!"}, + posts, err := h.mindflowDB.GetAll() + if err != nil { + return } + + for _, entry := range posts { + entry.Body = strings.ReplaceAll(entry.Body, "\\n", "\n") + } + web.RSS(r.URL.Scheme+"://"+r.Host, "Arav", posts, r, w) }