From eee1f3190355224eef63a4dcdef8c36eb3ca3738 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Mon, 3 Sep 2018 14:26:40 -0700 Subject: Refactor HTTP context handling --- ui/entry_update_status.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ui/entry_update_status.go') 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) -- cgit v1.2.3