mirror of
https://github.com/miniflux/v2.git
synced 2025-08-11 17:51:01 +00:00
perf(api): speed up markFeedAsRead
by avoiding a JOIN
operation
This commit is contained in:
parent
ed0e4a667d
commit
826977bc8c
1 changed files with 1 additions and 7 deletions
|
@ -140,13 +140,7 @@ func (h *handler) markFeedAsRead(w http.ResponseWriter, r *http.Request) {
|
|||
feedID := request.RouteInt64Param(r, "feedID")
|
||||
userID := request.UserID(r)
|
||||
|
||||
feed, err := h.store.FeedByID(userID, feedID)
|
||||
if err != nil {
|
||||
json.NotFound(w, r)
|
||||
return
|
||||
}
|
||||
|
||||
if feed == nil {
|
||||
if !h.store.FeedExists(userID, feedID) {
|
||||
json.NotFound(w, r)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue