Added ability to reject and rework article

This commit is contained in:
2024-03-10 15:03:46 +01:00
parent a1a6b6c29f
commit f10220f936
13 changed files with 237 additions and 88 deletions

View File

@ -8,15 +8,15 @@ import (
"streifling.com/jason/cpolis/cmd/model"
)
func GetChannel(db *model.DB, title, link, desc string) (*rss.Channel, error) {
func GetChannel(db *model.DB, title, link, description string) (*rss.Channel, error) {
channel := &rss.Channel{
Title: title,
Link: link,
Description: desc,
Description: description,
Items: make([]*rss.Item, 0),
}
articles, err := db.GetCertainArticles(true)
articles, err := db.GetCertainArticles(true, false)
if err != nil {
return nil, fmt.Errorf("error fetching published articles: %v", err)
}
@ -40,7 +40,7 @@ func GetChannel(db *model.DB, title, link, desc string) (*rss.Channel, error) {
Title: article.Title,
Author: user.FirstName + user.LastName,
PubDate: article.Created.Format(time.RFC1123Z),
Description: article.Desc,
Description: article.Description,
Content: &rss.Content{Value: article.Content},
Categories: tagNames,
})