mirror of
https://github.com/miniflux/v2.git
synced 2025-09-30 19:22:11 +00:00
Move UI middlewares and routes to ui package
This commit is contained in:
parent
0925899cee
commit
5a69a61d48
70 changed files with 739 additions and 769 deletions
|
@ -12,8 +12,7 @@ import (
|
|||
"miniflux.app/http/response/json"
|
||||
)
|
||||
|
||||
// UpdateEntriesStatus updates the status for a list of entries.
|
||||
func (c *Controller) UpdateEntriesStatus(w http.ResponseWriter, r *http.Request) {
|
||||
func (h *handler) updateEntriesStatus(w http.ResponseWriter, r *http.Request) {
|
||||
entryIDs, status, err := decodeEntryStatusPayload(r.Body)
|
||||
if err != nil {
|
||||
json.BadRequest(w, r, err)
|
||||
|
@ -25,7 +24,7 @@ func (c *Controller) UpdateEntriesStatus(w http.ResponseWriter, r *http.Request)
|
|||
return
|
||||
}
|
||||
|
||||
err = c.store.SetEntriesStatus(request.UserID(r), entryIDs, status)
|
||||
err = h.store.SetEntriesStatus(request.UserID(r), entryIDs, status)
|
||||
if err != nil {
|
||||
json.ServerError(w, r, err)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue