mirror of
https://github.com/miniflux/v2.git
synced 2025-08-26 18:21:01 +00:00
Add API endpoint to flush history
This commit is contained in:
parent
1350f84ea4
commit
5774323f2e
5 changed files with 48 additions and 4 deletions
|
@ -283,6 +283,12 @@ func (h *handler) fetchContent(w http.ResponseWriter, r *http.Request) {
|
|||
json.OK(w, r, map[string]string{"content": entry.Content})
|
||||
}
|
||||
|
||||
func (h *handler) flushHistory(w http.ResponseWriter, r *http.Request) {
|
||||
loggedUserID := request.UserID(r)
|
||||
go h.store.FlushHistory(loggedUserID)
|
||||
json.Accepted(w, r)
|
||||
}
|
||||
|
||||
func configureFilters(builder *storage.EntryQueryBuilder, r *http.Request) {
|
||||
if beforeEntryID := request.QueryInt64Param(r, "before_entry_id", 0); beforeEntryID > 0 {
|
||||
builder.BeforeEntryID(beforeEntryID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue