aboutsummaryrefslogtreecommitdiff
path: root/ui/integration_update.go
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <f@miniflux.net> 2023-07-10 20:59:49 -0700
committerGravatar Frédéric Guillot <f@miniflux.net> 2023-07-10 21:07:05 -0700
commit7988241e11da79dd0f2d88edabfbdee298663b32 (patch)
tree24139494efb4d8357dbc026ceae9ec85cd1b8385 /ui/integration_update.go
parent309e6d1084233577a11e086ae3b06927ffb0aae9 (diff)
downloadv2-7988241e11da79dd0f2d88edabfbdee298663b32.tar.gz
v2-7988241e11da79dd0f2d88edabfbdee298663b32.tar.zst
v2-7988241e11da79dd0f2d88edabfbdee298663b32.zip
Fix regression in integration page and simplify SQL query
Diffstat (limited to 'ui/integration_update.go')
-rw-r--r--ui/integration_update.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/ui/integration_update.go b/ui/integration_update.go
index 30f1824f..007239f4 100644
--- a/ui/integration_update.go
+++ b/ui/integration_update.go
@@ -8,6 +8,7 @@ import (
"fmt"
"net/http"
+ "miniflux.app/crypto"
"miniflux.app/http/request"
"miniflux.app/http/response/html"
"miniflux.app/http/route"
@@ -56,11 +57,16 @@ func (h *handler) updateIntegration(w http.ResponseWriter, r *http.Request) {
if integration.GoogleReaderEnabled {
if integrationForm.GoogleReaderPassword != "" {
- integration.GoogleReaderPassword = integrationForm.GoogleReaderPassword
+ integration.GoogleReaderPassword, err = crypto.HashPassword(integrationForm.GoogleReaderPassword)
+ if err != nil {
+ html.ServerError(w, r, err)
+ return
+ }
}
} else {
integration.GoogleReaderPassword = ""
}
+
err = h.store.UpdateIntegration(integration)
if err != nil {
html.ServerError(w, r, err)