mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Add more filters for API call /entries
New filters: - before (unix timestamp) - before_entry_id - after - after_entry_id - starred (boolean)
This commit is contained in:
parent
c5373ff2bf
commit
36dab8b518
7 changed files with 99 additions and 17 deletions
|
@ -490,7 +490,7 @@ func (c *Controller) handleWriteItems(w http.ResponseWriter, r *http.Request) {
|
|||
userID := ctx.UserID()
|
||||
logger.Debug("[Fever] Receiving mark=item call for userID=%d", userID)
|
||||
|
||||
entryID := request.FormIntValue(r, "id")
|
||||
entryID := request.FormInt64Value(r, "id")
|
||||
if entryID <= 0 {
|
||||
return
|
||||
}
|
||||
|
@ -548,7 +548,7 @@ func (c *Controller) handleWriteFeeds(w http.ResponseWriter, r *http.Request) {
|
|||
userID := ctx.UserID()
|
||||
logger.Debug("[Fever] Receiving mark=feed call for userID=%d", userID)
|
||||
|
||||
feedID := request.FormIntValue(r, "id")
|
||||
feedID := request.FormInt64Value(r, "id")
|
||||
if feedID <= 0 {
|
||||
return
|
||||
}
|
||||
|
@ -557,7 +557,7 @@ func (c *Controller) handleWriteFeeds(w http.ResponseWriter, r *http.Request) {
|
|||
builder.WithStatus(model.EntryStatusUnread)
|
||||
builder.WithFeedID(feedID)
|
||||
|
||||
before := request.FormIntValue(r, "before")
|
||||
before := request.FormInt64Value(r, "before")
|
||||
if before > 0 {
|
||||
t := time.Unix(before, 0)
|
||||
builder.BeforeDate(t)
|
||||
|
@ -589,7 +589,7 @@ func (c *Controller) handleWriteGroups(w http.ResponseWriter, r *http.Request) {
|
|||
userID := ctx.UserID()
|
||||
logger.Debug("[Fever] Receiving mark=group call for userID=%d", userID)
|
||||
|
||||
groupID := request.FormIntValue(r, "id")
|
||||
groupID := request.FormInt64Value(r, "id")
|
||||
if groupID < 0 {
|
||||
return
|
||||
}
|
||||
|
@ -598,7 +598,7 @@ func (c *Controller) handleWriteGroups(w http.ResponseWriter, r *http.Request) {
|
|||
builder.WithStatus(model.EntryStatusUnread)
|
||||
builder.WithCategoryID(groupID)
|
||||
|
||||
before := request.FormIntValue(r, "before")
|
||||
before := request.FormInt64Value(r, "before")
|
||||
if before > 0 {
|
||||
t := time.Unix(before, 0)
|
||||
builder.BeforeDate(t)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue