mirror of
https://github.com/miniflux/v2.git
synced 2025-08-06 17:41:00 +00:00
Avoid duplication between get feed entries and get entries API endpoints
This commit is contained in:
parent
debbf5a5b0
commit
55fad7ea27
2 changed files with 13 additions and 51 deletions
|
@ -96,7 +96,7 @@ func (e *EntryQueryBuilder) WithEntryID(entryID int64) *EntryQueryBuilder {
|
|||
|
||||
// WithFeedID filter by feed ID.
|
||||
func (e *EntryQueryBuilder) WithFeedID(feedID int64) *EntryQueryBuilder {
|
||||
if feedID != 0 {
|
||||
if feedID > 0 {
|
||||
e.conditions = append(e.conditions, fmt.Sprintf("e.feed_id = $%d", len(e.args)+1))
|
||||
e.args = append(e.args, feedID)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue