1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-11 17:51:01 +00:00

Add Google Reader API implementation (experimental)

Co-authored-by: Sebastian Kempken <sebastian@kempken.io>
Co-authored-by: Gergan Penkov <gergan@gmail.com>
Co-authored-by: Dave Marquard <dave@marquard.org>
Co-authored-by: Moritz Fago <4459068+MoritzFago@users.noreply.github.com>
This commit is contained in:
Gergan Penkov 2022-01-03 04:45:12 +01:00 committed by GitHub
parent 2935aaef45
commit 4b6e46d9ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 1923 additions and 36 deletions

View file

@ -49,6 +49,19 @@ func (h *handler) updateIntegration(w http.ResponseWriter, r *http.Request) {
integration.FeverToken = ""
}
if integration.GoogleReaderUsername != "" && h.store.HasDuplicateGoogleReaderUsername(user.ID, integration.GoogleReaderUsername) {
sess.NewFlashErrorMessage(printer.Printf("error.duplicate_googlereader_username"))
html.Redirect(w, r, route.Path(h.router, "integrations"))
return
}
if integration.GoogleReaderEnabled {
if integrationForm.GoogleReaderPassword != "" {
integration.GoogleReaderPassword = integrationForm.GoogleReaderPassword
}
} else {
integration.GoogleReaderPassword = ""
}
err = h.store.UpdateIntegration(integration)
if err != nil {
html.ServerError(w, r, err)