aboutsummaryrefslogtreecommitdiff
path: root/fever/handler.go
diff options
context:
space:
mode:
authorGravatar Kun Devanny <kun@kdand.com> 2020-06-24 05:48:25 +0100
committerGravatar GitHub <noreply@github.com> 2020-06-23 21:48:25 -0700
commitf7273e5cdf270f3485096bc6d8da7f61b4d874a3 (patch)
treea1e0577c7a2c380b19fae9d3c2df0b1081d9b8c0 /fever/handler.go
parent83046662612f6ccc3551c328b21322ef7c92f474 (diff)
downloadv2-f7273e5cdf270f3485096bc6d8da7f61b4d874a3.tar.gz
v2-f7273e5cdf270f3485096bc6d8da7f61b4d874a3.tar.zst
v2-f7273e5cdf270f3485096bc6d8da7f61b4d874a3.zip
Use getEntryIDs instead of getEntries in Fever API
Diffstat (limited to '')
-rw-r--r--fever/handler.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/fever/handler.go b/fever/handler.go
index 1c31b174..0f9de921 100644
--- a/fever/handler.go
+++ b/fever/handler.go
@@ -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