1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

Add API endpoint to flush history

This commit is contained in:
Frédéric Guillot 2023-10-05 21:37:45 -07:00
parent 1350f84ea4
commit 5774323f2e
5 changed files with 48 additions and 4 deletions

View file

@ -512,6 +512,12 @@ func (c *Client) FetchCounters() (*FeedCounters, error) {
return &result, nil
}
// FlushHistory changes all entries with the status "read" to "removed".
func (c *Client) FlushHistory() error {
_, err := c.request.Put("/v1/flush-history", nil)
return err
}
func buildFilterQueryString(path string, filter *Filter) string {
if filter != nil {
values := url.Values{}