diff options
author | Frédéric Guillot <fred@miniflux.net> | 2019-11-29 11:17:14 -0800 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2019-11-29 11:27:58 -0800 |
commit | 69aa650203087ad6365fcd6769a49bdf327e9efb (patch) | |
tree | 2b74ede78da683a9442da0851718d981614a37b7 /storage | |
parent | 8028cc764ff7d53370b64ec8110cbcdece787432 (diff) |
Add the possibility to add rules during feed creation
Diffstat (limited to 'storage')
-rw-r--r-- | storage/feed.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/storage/feed.go b/storage/feed.go index 6db3488..c5ba464 100644 --- a/storage/feed.go +++ b/storage/feed.go @@ -346,10 +346,12 @@ func (s *Storage) CreateFeed(feed *model.Feed) error { user_agent, username, password, - disabled + disabled, + scraper_rules, + rewrite_rules ) VALUES - ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) + ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) RETURNING id ` @@ -367,6 +369,8 @@ func (s *Storage) CreateFeed(feed *model.Feed) error { feed.Username, feed.Password, feed.Disabled, + feed.ScraperRules, + feed.RewriteRules, ).Scan(&feed.ID) if err != nil { return fmt.Errorf(`store: unable to create feed %q: %v`, feed.FeedURL, err) |