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

Refactor feed creation to allow setting most fields via API

Allow API clients to create disabled feeds or define field like "ignore_http_cache".
This commit is contained in:
Frédéric Guillot 2021-01-02 16:33:41 -08:00 committed by fguillot
parent ab82c4b300
commit f0610bdd9c
26 changed files with 370 additions and 264 deletions

View file

@ -465,10 +465,11 @@ func (s *Storage) CreateFeed(feed *model.Feed) error {
rewrite_rules,
blocklist_rules,
keeplist_rules,
ignore_http_cache,
fetch_via_proxy
)
VALUES
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17)
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18)
RETURNING
id
`
@ -490,6 +491,7 @@ func (s *Storage) CreateFeed(feed *model.Feed) error {
feed.RewriteRules,
feed.BlocklistRules,
feed.KeeplistRules,
feed.IgnoreHTTPCache,
feed.FetchViaProxy,
).Scan(&feed.ID)
if err != nil {