1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00

Add the possibility to add rules during feed creation

This commit is contained in:
Frédéric Guillot 2019-11-29 11:17:14 -08:00
parent 8028cc764f
commit 69aa650203
13 changed files with 74 additions and 32 deletions

View file

@ -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)