forked from jason/cpolis
		
	Fixed bug not showing correct issue in RSS feed
This commit is contained in:
		@@ -50,7 +50,7 @@ func main() {
 | 
			
		||||
	mux.HandleFunc("GET /edit-user/", view.EditUser(db, store))
 | 
			
		||||
	mux.HandleFunc("GET /hub/", view.ShowHub(db, store))
 | 
			
		||||
	mux.HandleFunc("GET /logout/", view.Logout(store))
 | 
			
		||||
	mux.HandleFunc("GET /publish-issue/", view.PublishLatestIssue(db))
 | 
			
		||||
	mux.HandleFunc("GET /publish-issue/", view.PublishLatestIssue(db, store))
 | 
			
		||||
	mux.HandleFunc("GET /rejected-articles/", view.ShowRejectedArticles(db, store))
 | 
			
		||||
	mux.HandleFunc("GET /rss/", view.ShowRSS(
 | 
			
		||||
		db,
 | 
			
		||||
 
 | 
			
		||||
@@ -105,7 +105,7 @@ func (db *DB) GetArticle(id int64) (*Article, error) {
 | 
			
		||||
 | 
			
		||||
func (db *DB) GetCertainArticles(published, rejected bool) ([]*Article, error) {
 | 
			
		||||
	query := `
 | 
			
		||||
    SELECT id, title, created, description, content, author_id
 | 
			
		||||
    SELECT id, title, created, description, content, author_id, issue_id
 | 
			
		||||
    FROM articles
 | 
			
		||||
    WHERE published = ?
 | 
			
		||||
    AND rejected = ?
 | 
			
		||||
@@ -121,7 +121,8 @@ func (db *DB) GetCertainArticles(published, rejected bool) ([]*Article, error) {
 | 
			
		||||
		var created []byte
 | 
			
		||||
 | 
			
		||||
		if err = rows.Scan(&article.ID, &article.Title, &created,
 | 
			
		||||
			&article.Description, &article.Content, &article.AuthorID); err != nil {
 | 
			
		||||
			&article.Description, &article.Content, &article.AuthorID,
 | 
			
		||||
			&article.IssueID); err != nil {
 | 
			
		||||
			return nil, fmt.Errorf("error scanning article row: %v", err)
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user