Skip to content

Commit

Permalink
Use getEntryIDs instead of getEntries in Fever API
Browse files Browse the repository at this point in the history
  • Loading branch information
kdvy authored Jun 24, 2020
1 parent 8304666 commit f7273e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fever/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,15 +325,15 @@ func (h *handler) handleUnreadItems(w http.ResponseWriter, r *http.Request) {

builder := h.store.NewEntryQueryBuilder(userID)
builder.WithStatus(model.EntryStatusUnread)
entries, err := builder.GetEntries()
rawEntryIDs, err := builder.GetEntryIDs()
if err != nil {
json.ServerError(w, r, err)
return
}

var itemIDs []string
for _, entry := range entries {
itemIDs = append(itemIDs, strconv.FormatInt(entry.ID, 10))
for _, entryID := range rawEntryIDs {
itemIDs = append(itemIDs, strconv.FormatInt(entryID, 10))
}

var result unreadResponse
Expand Down

0 comments on commit f7273e5

Please sign in to comment.