1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-07-22 17:18:37 +00:00

Added integration for Readwise Reader

This commit is contained in:
Corey McCaffrey 2023-07-27 23:51:44 -04:00 committed by GitHub
parent 3aad650622
commit 3bac768cda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 178 additions and 3 deletions

View file

@ -41,6 +41,8 @@ type IntegrationForm struct {
EspialURL string
EspialAPIKey string
EspialTags string
ReadwiseEnabled bool
ReadwiseAPIKey string
PocketEnabled bool
PocketAccessToken string
PocketConsumerKey string
@ -89,6 +91,8 @@ func (i IntegrationForm) Merge(integration *model.Integration) {
integration.EspialURL = i.EspialURL
integration.EspialAPIKey = i.EspialAPIKey
integration.EspialTags = i.EspialTags
integration.ReadwiseEnabled = i.ReadwiseEnabled
integration.ReadwiseAPIKey = i.ReadwiseAPIKey
integration.PocketEnabled = i.PocketEnabled
integration.PocketAccessToken = i.PocketAccessToken
integration.PocketConsumerKey = i.PocketConsumerKey
@ -140,6 +144,8 @@ func NewIntegrationForm(r *http.Request) *IntegrationForm {
EspialURL: r.FormValue("espial_url"),
EspialAPIKey: r.FormValue("espial_api_key"),
EspialTags: r.FormValue("espial_tags"),
ReadwiseEnabled: r.FormValue("readwise_enabled") == "1",
ReadwiseAPIKey: r.FormValue("readwise_api_key"),
PocketEnabled: r.FormValue("pocket_enabled") == "1",
PocketAccessToken: r.FormValue("pocket_access_token"),
PocketConsumerKey: r.FormValue("pocket_consumer_key"),