mirror of
https://github.com/miniflux/v2.git
synced 2024-09-27 21:02:41 +02:00
If the website URL is empty, assign the feed URL
This commit is contained in:
parent
d2b137d038
commit
ec63cbe7bb
@ -75,6 +75,10 @@ func (h *Handler) CreateFeed(userID, categoryID int64, url string, crawler bool)
|
||||
subscription.UserID = userID
|
||||
subscription.Crawler = crawler
|
||||
|
||||
if subscription.SiteURL == "" {
|
||||
subscription.SiteURL = subscription.FeedURL
|
||||
}
|
||||
|
||||
err = h.store.CreateFeed(subscription)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -171,6 +175,10 @@ func (h *Handler) RefreshFeed(userID, feedID int64) error {
|
||||
originalFeed.ParsingErrorCount = 0
|
||||
originalFeed.ParsingErrorMsg = ""
|
||||
|
||||
if originalFeed.SiteURL == "" {
|
||||
originalFeed.SiteURL = originalFeed.FeedURL
|
||||
}
|
||||
|
||||
return h.store.UpdateFeed(originalFeed)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user