aboutsummaryrefslogtreecommitdiffhomepage
path: root/model
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2018-06-19 22:58:29 -0700
committerGravatar Frédéric Guillot <fred@miniflux.net>2018-06-19 22:58:29 -0700
commitbddca15b69692bd055c507f2469e68dca1e56098 (patch)
tree913989e170cc3ac46558c682f8ec10813a0ae3c5 /model
parent261695c14c2d768f392cfb774e7940660edaa3d9 (diff)
Add new fields for feed username/password
Diffstat (limited to 'model')
-rw-r--r--model/feed.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/model/feed.go b/model/feed.go
index c2ee6e8..9c7ecca 100644
--- a/model/feed.go
+++ b/model/feed.go
@@ -24,6 +24,8 @@ type Feed struct {
ScraperRules string `json:"scraper_rules"`
RewriteRules string `json:"rewrite_rules"`
Crawler bool `json:"crawler"`
+ Username string `json:"username"`
+ Password string `json:"password"`
Category *Category `json:"category,omitempty"`
Entries Entries `json:"entries,omitempty"`
Icon *FeedIcon `json:"icon"`
@@ -69,6 +71,14 @@ func (f *Feed) Merge(override *Feed) {
if override.Category != nil && override.Category.ID != 0 && override.Category.ID != f.Category.ID {
f.Category.ID = override.Category.ID
}
+
+ if override.Username != f.Username {
+ f.Username = override.Username
+ }
+
+ if override.Password != f.Password {
+ f.Password = override.Password
+ }
}
// Feeds is a list of feed