1
0
Fork 0
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:
Julien Voisin 2025-08-06 02:55:15 +02:00 committed by GitHub
parent ed0e4a667d
commit 826977bc8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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
}