fix: Honor hide_globally when creating a new feed through the api
TestGetGlobalEntriesEndpoint was failing because CreateFeed ignored HideGlobally, this fixes that.
This commit is contained in:
parent
6fb7e84ce1
commit
ade412f453
2 changed files with 11 additions and 0 deletions
|
@ -2011,6 +2011,16 @@ func TestGetGlobalEntriesEndpoint(t *testing.T) {
|
|||
t.Fatal(err)
|
||||
}
|
||||
|
||||
feedIDEntry, err := regularUserClient.Feed(feedID)
|
||||
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if feedIDEntry.HideGlobally != true {
|
||||
t.Fatalf(`Expected feed to have globally_hidden set to true, was false.`)
|
||||
}
|
||||
|
||||
/* Not filtering on GloballyVisible should return all entries */
|
||||
feedEntries, err := regularUserClient.Entries(&miniflux.Filter{FeedID: feedID})
|
||||
|
||||
|
|
|
@ -169,6 +169,7 @@ func CreateFeed(store *storage.Storage, userID int64, feedCreationRequest *model
|
|||
subscription.BlocklistRules = feedCreationRequest.BlocklistRules
|
||||
subscription.KeeplistRules = feedCreationRequest.KeeplistRules
|
||||
subscription.UrlRewriteRules = feedCreationRequest.UrlRewriteRules
|
||||
subscription.HideGlobally = feedCreationRequest.HideGlobally
|
||||
subscription.EtagHeader = responseHandler.ETag()
|
||||
subscription.LastModifiedHeader = responseHandler.LastModified()
|
||||
subscription.FeedURL = responseHandler.EffectiveURL()
|
||||
|
|
Loading…
Add table
Reference in a new issue