mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
Add new fields for feed username/password
This commit is contained in:
parent
261695c14c
commit
bddca15b69
27 changed files with 203 additions and 68 deletions
|
@ -21,6 +21,8 @@ type FeedForm struct {
|
|||
RewriteRules string
|
||||
Crawler bool
|
||||
CategoryID int64
|
||||
Username string
|
||||
Password string
|
||||
}
|
||||
|
||||
// ValidateModification validates FeedForm fields
|
||||
|
@ -42,6 +44,8 @@ func (f FeedForm) Merge(feed *model.Feed) *model.Feed {
|
|||
feed.Crawler = f.Crawler
|
||||
feed.ParsingErrorCount = 0
|
||||
feed.ParsingErrorMsg = ""
|
||||
feed.Username = f.Username
|
||||
feed.Password = f.Password
|
||||
return feed
|
||||
}
|
||||
|
||||
|
@ -60,5 +64,7 @@ func NewFeedForm(r *http.Request) *FeedForm {
|
|||
RewriteRules: r.FormValue("rewrite_rules"),
|
||||
Crawler: r.FormValue("crawler") == "1",
|
||||
CategoryID: int64(categoryID),
|
||||
Username: r.FormValue("username"),
|
||||
Password: r.FormValue("password"),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue