Created func for minimum spec for rss and article structs, thereby crushing an annoying bug that was caused by not initializing channels but waiting for messages to go through them
This commit is contained in:
@ -60,7 +60,7 @@ func FinishArticle(l *data.ArticleList) http.HandlerFunc {
|
||||
|
||||
func ShowUnpublishedArticles(l *data.ArticleList) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
template.Must(template.ParseFiles("web/templates/unpublished-articles.html")).ExecuteTemplate(w, "page-content", l.List)
|
||||
template.Must(template.ParseFiles("web/templates/unpublished-articles.html")).ExecuteTemplate(w, "page-content", l.Get())
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ func ReviewArticle(l *data.ArticleList) http.HandlerFunc {
|
||||
return
|
||||
}
|
||||
|
||||
for _, article := range l.List() {
|
||||
for _, article := range l.Get() {
|
||||
if article.UUID == uuid {
|
||||
template.Must(template.ParseFiles("web/templates/to-be-published.html")).ExecuteTemplate(w, "page-content", article)
|
||||
return
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
|
||||
func ShowRSS(f *data.Feed) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
feed := f.Show()
|
||||
feed := f.Get()
|
||||
rss, err := feed.ToRss()
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
|
Reference in New Issue
Block a user