1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

Fix regression in integration page and simplify SQL query

This commit is contained in:
Frédéric Guillot 2023-07-10 20:59:49 -07:00
parent 309e6d1084
commit 7988241e11
4 changed files with 72 additions and 174 deletions

View file

@ -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)