Added description and a way to save and restore the RSS feed.
This commit is contained in:
@ -8,9 +8,10 @@ import (
|
||||
"streifling.com/jason/cpolis/cmd/feed"
|
||||
)
|
||||
|
||||
func HandleFinishedEdit(f feed.Feed) http.HandlerFunc {
|
||||
func HandleFinishedEdit(f *feed.Feed) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
title := r.PostFormValue("editor-title")
|
||||
desc := r.PostFormValue("editor-desc")
|
||||
mdContent := r.PostFormValue("editor-text")
|
||||
|
||||
content, err := articles.ConvertToHTML(mdContent)
|
||||
@ -19,7 +20,8 @@ func HandleFinishedEdit(f feed.Feed) http.HandlerFunc {
|
||||
log.Panicln(err)
|
||||
}
|
||||
|
||||
feed.AddToFeed(f, title, content)
|
||||
feed.AddToFeed(f, title, desc, content)
|
||||
feed.SaveFeed(f, "tmp/rss.gob")
|
||||
// template.Must(template.ParseFiles("web/templates/editor.html")).ExecuteTemplate(w, "html-result", rssItem)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user