1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-06 17:41:00 +00:00

fix(consistency): align entry fetch content behavior between API and UI

This commit is contained in:
AiraNadih 2025-04-16 02:22:46 +08:00 committed by GitHub
parent bc228d0afe
commit c70ef43057
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -331,7 +331,14 @@ func (h *handler) fetchContent(w http.ResponseWriter, r *http.Request) {
return
}
json.OK(w, r, map[string]string{"content": entry.Content})
if err := h.store.UpdateEntryTitleAndContent(entry); err != nil {
json.ServerError(w, r, err)
return
}
readingTime := locale.NewPrinter(user.Language).Plural("entry.estimated_reading_time", entry.ReadingTime, entry.ReadingTime)
json.OK(w, r, map[string]string{"content": mediaproxy.RewriteDocumentWithRelativeProxyURL(h.router, entry.Content), "reading_time": readingTime})
}
func (h *handler) flushHistory(w http.ResponseWriter, r *http.Request) {