diff options
author | Frédéric Guillot <fred@miniflux.net> | 2018-09-03 14:26:40 -0700 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2018-09-03 14:26:40 -0700 |
commit | eee1f3190355224eef63a4dcdef8c36eb3ca3738 (patch) | |
tree | 009b7ca67b96d9be473d8ddf2c8c95f22a6749d1 /ui/entry_update_status.go | |
parent | 88e81d4d800ff6433518522954197d75203a25c2 (diff) |
Refactor HTTP context handling
Diffstat (limited to 'ui/entry_update_status.go')
-rw-r--r-- | ui/entry_update_status.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ui/entry_update_status.go b/ui/entry_update_status.go index 4f5c114..8e9de4d 100644 --- a/ui/entry_update_status.go +++ b/ui/entry_update_status.go @@ -2,13 +2,13 @@ // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. -package ui // import "miniflux.app/ui" +package ui // import "miniflux.app/ui" import ( "errors" "net/http" - "miniflux.app/http/context" + "miniflux.app/http/request" "miniflux.app/http/response/json" "miniflux.app/logger" ) @@ -27,8 +27,7 @@ func (c *Controller) UpdateEntriesStatus(w http.ResponseWriter, r *http.Request) return } - ctx := context.New(r) - err = c.store.SetEntriesStatus(ctx.UserID(), entryIDs, status) + err = c.store.SetEntriesStatus(request.UserID(r), entryIDs, status) if err != nil { logger.Error("[Controller:UpdateEntryStatus] %v", err) json.ServerError(w, nil) |