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:
parent
bc228d0afe
commit
c70ef43057
1 changed files with 8 additions and 1 deletions
|
@ -331,7 +331,14 @@ func (h *handler) fetchContent(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
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) {
|
func (h *handler) flushHistory(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue