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:
parent
309e6d1084
commit
7988241e11
4 changed files with 72 additions and 174 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue