diff options
Diffstat (limited to 'ui/integration_update.go')
-rw-r--r-- | ui/integration_update.go | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/ui/integration_update.go b/ui/integration_update.go index f470e4b..5661daf 100644 --- a/ui/integration_update.go +++ b/ui/integration_update.go @@ -2,16 +2,15 @@ // 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 ( "crypto/md5" "fmt" "net/http" - "miniflux.app/http/response" - "miniflux.app/http/request" "miniflux.app/http/response/html" + "miniflux.app/http/request" "miniflux.app/http/route" "miniflux.app/locale" "miniflux.app/ui/form" @@ -24,13 +23,13 @@ func (c *Controller) UpdateIntegration(w http.ResponseWriter, r *http.Request) { sess := session.New(c.store, request.SessionID(r)) user, err := c.store.UserByID(request.UserID(r)) if err != nil { - html.ServerError(w, err) + html.ServerError(w, r, err) return } integration, err := c.store.Integration(user.ID) if err != nil { - html.ServerError(w, err) + html.ServerError(w, r, err) return } @@ -39,7 +38,7 @@ func (c *Controller) UpdateIntegration(w http.ResponseWriter, r *http.Request) { if integration.FeverUsername != "" && c.store.HasDuplicateFeverUsername(user.ID, integration.FeverUsername) { sess.NewFlashErrorMessage(printer.Printf("error.duplicate_fever_username")) - response.Redirect(w, r, route.Path(c.router, "integrations")) + html.Redirect(w, r, route.Path(c.router, "integrations")) return } @@ -51,10 +50,10 @@ func (c *Controller) UpdateIntegration(w http.ResponseWriter, r *http.Request) { err = c.store.UpdateIntegration(integration) if err != nil { - html.ServerError(w, err) + html.ServerError(w, r, err) return } sess.NewFlashMessage(printer.Printf("alert.prefs_saved")) - response.Redirect(w, r, route.Path(c.router, "integrations")) + html.Redirect(w, r, route.Path(c.router, "integrations")) } |