Gather mindflow posts in RSS.
This commit is contained in:
parent
1b61434623
commit
7bab607e25
@ -146,9 +146,15 @@ func (h *Handlers) GuestbookAdmin(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (h *Handlers) RSS(w http.ResponseWriter, r *http.Request) {
|
func (h *Handlers) RSS(w http.ResponseWriter, r *http.Request) {
|
||||||
posts := []mindflow.Post{
|
posts, err := h.mindflowDB.GetAll()
|
||||||
{Category: mindflow.Category{ID: 1, Name: "Update"}, Date: time.Now(), Title: "LMAO", Body: "Testing!"},
|
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)
|
web.RSS(r.URL.Scheme+"://"+r.Host, "Arav", posts, r, w)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user