forked from jason/cpolis
		
	Generate RSS to file
This commit is contained in:
		@@ -305,6 +305,23 @@ func PublishArticle(db *model.DB, s *control.CookieStore) http.HandlerFunc {
 | 
			
		||||
			return
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		feed, err := control.GenerateRSS(
 | 
			
		||||
			db,
 | 
			
		||||
			"Freimaurer Distrikt Niedersachsen und Sachsen-Anhalt",
 | 
			
		||||
			"https://distrikt-ni-st.de",
 | 
			
		||||
			"Freiheit, Gleichheit, Brüderlichkeit, Toleranz und Humanität",
 | 
			
		||||
		)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			log.Println(err)
 | 
			
		||||
			http.Error(w, err.Error(), http.StatusInternalServerError)
 | 
			
		||||
			return
 | 
			
		||||
		}
 | 
			
		||||
		if err = control.SaveRSS("tmp/orientexpress_alle.rss", feed); err != nil {
 | 
			
		||||
			log.Println(err)
 | 
			
		||||
			http.Error(w, err.Error(), http.StatusInternalServerError)
 | 
			
		||||
			return
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		tmpl, err := template.ParseFiles("web/templates/hub.html")
 | 
			
		||||
		tmpl = template.Must(tmpl, err)
 | 
			
		||||
		tmpl.ExecuteTemplate(w, "page-content", session.Values["role"])
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user