unread_mark_all_read.go 502 B

123456789101112131415161718192021
  1. // Copyright 2018 Frédéric Guillot. All rights reserved.
  2. // Use of this source code is governed by the Apache 2.0
  3. // license that can be found in the LICENSE file.
  4. package ui // import "miniflux.app/ui"
  5. import (
  6. "net/http"
  7. "miniflux.app/http/request"
  8. "miniflux.app/http/response/json"
  9. )
  10. func (h *handler) markAllAsRead(w http.ResponseWriter, r *http.Request) {
  11. if err := h.store.MarkAllAsRead(request.UserID(r)); err != nil {
  12. json.ServerError(w, r, err)
  13. return
  14. }
  15. json.OK(w, r, "OK")
  16. }