unread_mark_all_read.go 508 B

1234567891011121314151617181920
  1. // SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
  2. // SPDX-License-Identifier: Apache-2.0
  3. package ui // import "miniflux.app/v2/internal/ui"
  4. import (
  5. "net/http"
  6. "miniflux.app/v2/internal/http/request"
  7. "miniflux.app/v2/internal/http/response/json"
  8. )
  9. func (h *handler) markAllAsRead(w http.ResponseWriter, r *http.Request) {
  10. if err := h.store.MarkGloballyVisibleFeedsAsRead(request.UserID(r)); err != nil {
  11. json.ServerError(w, r, err)
  12. return
  13. }
  14. json.OK(w, r, "OK")
  15. }