aboutsummaryrefslogtreecommitdiffhomepage
path: root/ui/entry_save.go
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2018-09-03 14:26:40 -0700
committerGravatar Frédéric Guillot <fred@miniflux.net>2018-09-03 14:26:40 -0700
commiteee1f3190355224eef63a4dcdef8c36eb3ca3738 (patch)
tree009b7ca67b96d9be473d8ddf2c8c95f22a6749d1 /ui/entry_save.go
parent88e81d4d800ff6433518522954197d75203a25c2 (diff)
Refactor HTTP context handling
Diffstat (limited to 'ui/entry_save.go')
-rw-r--r--ui/entry_save.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/ui/entry_save.go b/ui/entry_save.go
index 292b526..488022a 100644
--- a/ui/entry_save.go
+++ b/ui/entry_save.go
@@ -2,13 +2,12 @@
// 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/integration"
@@ -23,9 +22,7 @@ func (c *Controller) SaveEntry(w http.ResponseWriter, r *http.Request) {
return
}
- ctx := context.New(r)
-
- builder := c.store.NewEntryQueryBuilder(ctx.UserID())
+ builder := c.store.NewEntryQueryBuilder(request.UserID(r))
builder.WithEntryID(entryID)
builder.WithoutStatus(model.EntryStatusRemoved)
@@ -40,7 +37,7 @@ func (c *Controller) SaveEntry(w http.ResponseWriter, r *http.Request) {
return
}
- settings, err := c.store.Integration(ctx.UserID())
+ settings, err := c.store.Integration(request.UserID(r))
if err != nil {
json.ServerError(w, err)
return